/* --- RLE Modern Minimalist: Shadow-Based Design --- */

/* 1. Global Reset - Removing Snow Monkey's Default Borders */
body .smf-form, 
body .smf-form--business,
body .smf-item {
    border: none !important;
}

/* 2. The Main Section Cards (#contact_info, #child_section, #final_section) */
body #contact_info, 
body #child_section, 
body #final_section {
    background-color: #ffffff !important;
    margin: 40px 0 !important;
    padding: 30px !important;
    border-radius: 12px !important; /* Slightly more rounded for a modern feel */
    border: none !important;
    /* Soft, multi-layered shadow for a "floating" effect */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02) !important;
    position: relative;
}

/* 3. The Step Badges - Modern "Floating" Style */
body #contact_info:before,
body #child_section:before,
body #final_section:before {
    position: absolute;
    top: -15px;
    left: 20px;
    background: #00a59d;
    color: #fff;
    padding: 5px 15px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 165, 157, 0.2);
    z-index: 10;
}

/* 4. Labels - Adjusted size for better balance */
body .smf-form span.smf-item__label__text {
    font-weight: 700 !important;
    color: #2d3748 !important;
    font-size: 1.5rem !important; /* Reduced from 1.5rem for better hierarchy */
}

/* 5. Input Fields - Modern Minimalist Style */
body .smf-form .smf-text-control__control,
body .smf-form .smf-select-control__control,
body .smf-form .smf-textarea-control__control {
    background-color: #f8fafc !important; /* Very light cool gray */
    border: 2px solid transparent !important; /* No border until focus */
    border-radius: 8px !important;
    padding: 14px 18px !important;
    font-size: 16px !important;
    transition: all 0.2s ease !important;
}

/* Input Focus - Bring in the Brand Color */
body .smf-form .smf-text-control__control:focus,
body .smf-form .smf-select-control__control:focus {
    background-color: #fff !important;
    border-color: #00a59d !important;
    box-shadow: 0 0 0 4px rgba(0, 165, 157, 0.1) !important;
    outline: none !important;
}

/* 6. Child Groups - Internal Spacing (No nested shadows) */
body #child1_group,
body #child2_group, 
body #child3_group { 
    background-color: transparent !important;
    margin: 30px 0 !important;
    padding: 20px 0 !important;
    border-top: 2px dashed #edf2f7 !important; /* Subtle separator */
    border-radius: 0px !important;
}

/* Group Headers */
body .wp-block-group > div > p strong {
    font-size: 2.4rem !important;
    color: #00a59d;
    margin-bottom: 20px;
}

/* 7. The Submit Button - Bold & Clean */
body .smf-button-control__control {
    background-color: #00a59d !important;
    background-image: none !important;
    color: #ffffff !important;
    padding: 20px 80px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 2rem !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 10px 15px -3px rgba(0, 165, 157, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body .smf-button-control__control:hover {
    background-color: #00847e !important;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 165, 157, 0.4) !important;
}

/* Mobile Adjustments for Typography */
@media (max-width: 600px) {
    body .smf-form .smf-item__label__text { font-size: 1.1rem !important; }
    body .wp-block-group p strong { font-size: 1.2rem !important; }
    body .smf-button-control__control { width: 100%; font-size: 1.2rem !important; }
}


/* --- Refined Error Messages --- */

body .smf-error-messages{
    color: #e53e3e !important;
    /* 12px is the "sweet spot" for Japanese alert text */
    font-size: 1.4rem !important; 
    font-weight: 500 !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
    display: block !important;
    /* Optional: adds a tiny dot before the message for a pro look */
}

body .smf-error-messages::before {
    content: "●";
    font-size: 0.6rem;
    margin-right: 5px;
    vertical-align: middle;
}

/* Ensure the error doesn't push the card layout too much */
body .smf-item__col--controls {
    display: flex;
    flex-direction: column;
}

/* --- Sibling Input Spacing (Name + Furigana) --- */

/* Targets any placeholder/input that comes after another one in the same column */
body .smf-item__controls > div + div,
body .smf-item__controls > .smf-placeholder + .smf-placeholder {
    margin-top: 12px !important; /* The "sweet spot" for stacked related fields */
}

/* --- Full-Width Field Expansion --- */

/* 1. Force the column container to treat its children as full-width blocks */
body .smf-form .smf-item__controls {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* 2. Force the Snow Monkey wrappers (placeholder, text-control, etc.) to expand */
body .smf-form .smf-placeholder,
body .smf-form .smf-text-control,
body .smf-form .smf-select-control,
body .smf-form .smf-textarea-control {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

/* 3. Force the actual input/select/textarea elements to 100% */
body .smf-form .smf-text-control__control,
body .smf-form .smf-select-control__control,
body .smf-form .smf-textarea-control__control {
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important; /* Ensures padding doesn't push it over the edge */
}
