/* ========================================================================= */
/* GLOBAL STYLES 
/* ========================================================================= */

body {
    font-family: "Hiragino Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #2F2F2F;
    font-size: 16px;
}

.container-padding {
    padding-bottom: 100px;
}

/* Card Container Base Styles */
.container-shadow {
    box-shadow: none;
    padding: 32px 50px 32px 50px;
    border-radius: 16px;
    background-color: transparent;
}

/* Breadcrumb Spacing & Alignment */
.desktop-only-container {
    margin-top: 18px !important; 
}

/* Removes default list top/bottom margins from Bootstrap breadcrumb list */
.breadcrumb {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
}

/* Custom Padding for Mobile */
.my-padding-mobile {
  padding-left: 56px;
  padding-right: 56px;
}

.breadcrumb-nav {
    margin-top: 20px;
}

/* Breadcrumb Links */
.breadcrumb-item a {
    color: #00A4FC;
}

.breadcrumb-item a:hover,
.breadcrumb-item a:focus,
.breadcrumb-item a:active {
    color: #00A4FC !important;
}

.breadcrumb-alignment-fix {
    padding-top: 1px;
}

.card-title {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 14px;
}

.card-sub-title {
    margin-bottom: 32px;
}

/* Center the step indicator component */
.d-flex.justify-content-between.align-items-center {
    max-width: 404px;
    margin-left: auto;
    margin-right: auto;
}

.gap-line {
    width: 100%; 
    height: 1px;
    background-color: #D9D9D9; 
}

.flex-grow-1.mx-2 {
    margin-left: 16px !important; 
    margin-right: 16px !important; 
}

.rounded-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    background-color: #E9E9E9;
    color: #626262;
}

.circle-first-step {
    background-color: #BAE499 !important;
    color: #013312;
    font-size: 16px;
    font-weight: 600;
}

/* Form Controls & Fields */
.form-control, 
.form-select {
    height: 48px;
    background-color: #F7F8F9;
    border: 1px solid #626262;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    padding-left: 14px !important;
    padding-right: 14px !important;
}

.form-control {
    max-width: 332px;
}

.form-select {
    max-width: 240px;
}

/* Placeholder Styling */
.form-control::-moz-placeholder, .form-select::-moz-placeholder,
.form-control:-ms-input-placeholder, .form-select:-ms-input-placeholder,
.form-control::-ms-input-placeholder, .form-select::-ms-input-placeholder,
select:invalid {
    color: #BCBCBC;
    opacity: 1;
}

.form-control::placeholder, .form-select::placeholder {
    color: #BCBCBC;
    opacity: 1;
}

select:invalid {
    color: #BCBCBC;
}

.field-container {
    max-width: 332px;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    margin-bottom: 10px !important; 
}

.d-flex.justify-content-center { 
    max-width: 332px; 
    margin-left: auto !important;
    margin-right: auto !important;
}

.was-validated .form-control:not([required]):valid,
.form-control:not([required]):valid {
    border-color: #626262;
    padding-right: 14px;
    background-image: none; /* Remove the checkmark icon */
}

.was-validated .form-control:not([required]):valid:not(:placeholder-shown) {
    border-color: #ced4da; 
}

.was-validated .form-control:not([required]):valid:placeholder-shown {
    background-color: #F7F8F9; 
    border-color: #626262;
    background-image: none;
}

/* ========================================================================= */
/* INPUT FIELD STYLING: Background White when filled */
/* ========================================================================= */

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(:placeholder-shown),
textarea:not(:placeholder-shown) {
    background-color: white !important; 
    border-color: #626262; 
}

.form-select option:not([value=""]) {
    background-color: white;
}

.form-select.is-filled {
    background-color: white !important;
}

/* ========================================================================= */
/* Ensuring the white background is applied when loading from Session Storage */
/* ========================================================================= */

.form-control:valid:not(:placeholder-shown),
.form-select:valid:not([value=""]) {
    background-color: white !important;
    border-color: #626262; 
}

.btn-success {
    background-color: #DCE100 !important;
    border-color: #DCE100 !important;
    color: #013312 !important; 
    border-radius: 32px;
    font-size: 20px;
    max-width: 140px;
    min-width: 140px;
    margin-top: 36px;
    min-height: 48px;
}

.flex-grow-1.mx-2 {
    margin-left: 16px !important; 
    margin-right: 16px !important; 
}

.button-container {
    margin-left: auto !important; 
    margin-right: auto !important; 
    max-width: 332px;
}

.back-button {
    background-color: transparent !important;
    border-color: transparent !important;
    color: #013312 !important; 
    border-radius: 32px;
    font-size: 20px;
    max-width: 140px;
    min-width: 140px;
    margin-top: 36px;
    height: 48px;
}

/* ========================================================================= */
/* BUTTON HOVER AND ACTIVE EFFECTS */
/* ========================================================================= */

/* NEXT BUTTON: "次へ" (Primary) */
.next-button {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.next-button:hover {
    background-color: #C6CB00 !important;
    border-color: #C6CB00 !important;
    box-shadow: none;
}

/* --- PRESSED/ACTIVE EFFECT --- */
.next-button:active {
    background-color: #E3E733 !important; 
    border-color: #E3E733 !important;
}

/* BACK BUTTON: "戻る" (Secondary) */
.back-button {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.back-button:hover {
    background-color: #F5F6F8 !important;
    border-color: #F5F6F8 !important;
    color: inherit; 
    box-shadow: none;
}

/* --- PRESSED/ACTIVE EFFECT --- */
.back-button:active {
    background-color: #FCFCE6 !important; 
    border-color: #FCFCE6 !important;
}

/* ========================================================================= */
/* BASE MODAL STYLES (Applies to ALL custom modals) */
/* ========================================================================= */

.custom-selection-modal .modal-dialog,
.service-selection-modal .modal-dialog {
    max-width: 358px; 
    margin: 0.5rem auto; 
}

.custom-selection-modal .modal-content,
.service-selection-modal .modal-content {
    width: 100%;
    padding: 8px;
    border-radius: 32px; 
}

.custom-selection-modal .modal-title,
.service-selection-modal .modal-title {
    width: 100%;
    text-align: center;
    font-weight: bold;
    color: #4CAF50;
    font-size: 18px; 
}

.custom-selection-modal .list-group-item.selection-option,
.service-selection-modal .list-group-item.selection-option {
    font-size: 16px; 
    color: #2F2F2F;
    padding: 12px 0; 
}

.custom-selection-modal .modal-header,
.service-selection-modal .modal-header {
    justify-content: flex-start; 
    border-bottom: none;
    padding-bottom: 0;
}

.custom-selection-modal .modal-header .btn-close,
.service-selection-modal .modal-header .btn-close {
    margin: 0; 
    margin-right: auto;
}

.close-menu {
    font-weight: 700;
    color: #2F2F2F;
}

/* ========================================================================= */
/* LONG LIST MODAL - FIXED HEIGHT & SCROLL */
/* ========================================================================= */

.custom-selection-modal .modal-dialog {
    min-height: 530px;
}

.custom-selection-modal .modal-content {
    /* Fixed height for the modal container (triggers the need for scrolling) */
    height: 530px; 
    
    /* Enables flex layout to separate header/footer from the scrollable body */
    display: flex;
    flex-direction: column; 
}

/* Modal Body (The Scrollable Area) */
.custom-selection-modal .modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding-top: 0;
    padding-bottom: 20px; 
}

/* ========================================================================= */
/* SHORT LIST MODAL - AUTO HEIGHT */
/* ========================================================================= */

.service-selection-modal .modal-dialog {
    max-height: 100%; /* No fixed height limit other than viewport */
}

.service-selection-modal .modal-content {
    /* Auto height to fit content (removes the fixed 304px constraint) */
    height: auto; 
    
    /* Remove the fixed flex layout if it interferes with auto-sizing */
    display: block; 
}

.service-selection-modal .modal-body {
    /* Remove scroll rules */
    overflow-y: visible;
    flex-grow: initial; 
}


/* Styling for completed progress circles */
.circle-first-step.completed,
.circle-second-step.completed,
.circle-third-step.completed {
    background-color: #52BC00 !important;
    color: #ffffff !important;
    border-color: #52BC00 !important;
}

.footer-alignment {
    display: flex;
    justify-content: center;
}

/* ========================================================================= */
/* TABLET VIEW (min-width: 768px) - For Shadow and Mobile Padding Override */
/* ========================================================================= */
@media (min-width: 768px) {
    .container-shadow {
        box-shadow: 0px 1px 22px 0px rgba(0, 0, 0, 0.12) !important;
        background-color: white !important; 
    }

    .my-padding-mobile {
        padding-left: 0;
        padding-right: 0;
    }
}

/* ========================================================================= */
/* DESKTOP VIEW (min-width: 992px) - For Max-Width Overrides */
/* ========================================================================= */
@media (min-width: 992px) {
    .container {     
        max-width: 1270px !important; 
    }
}

/* ========================================================================= */
/* SMALL MOBILE VIEW (max-width: 374px) - Minimize Padding */
/* ========================================================================= */
@media (max-width: 400px) {
    /* Reduce the Padding for the Breadcrumb Area */
    .my-padding-mobile {
        padding-left: 20px !important; 
        padding-right: 20px !important; 
    }

    /* Reduce Padding for the main Card/Container Area */
    .container-shadow {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    /* Ensure Field Containers don't exceed the new, narrower screen */
    .field-container, 
    .d-flex.justify-content-center { 
        max-width: 100%;
    }

    /* Ensure form controls fill the container */
    .form-control,
    .form-select {
        max-width: 100%; 
    }
}

