/* ============================================
   Styles from templates/Trial/index.php
   ============================================ */
   .rdo-gender label {
    margin-right: 40px;
}

.container-fluid {
    width: 98%;
}
/* タブの幅を狭く */
.nav-link {
    padding: .5rem 0.5rem;
}
.nav-tabs {
    border-bottom: none;
}

/* 体験を希望する授業リスト */
#normal_lesson_list {
    display: none; /* 初期非表示 */
}
/* ご紹介者 */
#introduce {
    display: none;
}
/* 非表示にするoptionの親span for safari */
.hide-option {
    display: none;
}
/* Navigation buttons */
.step-navigation {
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 26%;
}

.step-navigation .btn {
    min-width: 120px;
}

@media (max-width: 468px) {
    .step-navigation {
        gap: 10%;
    }
}

/* Bootstrap 5 text-bg-danger support (if using Bootstrap 4) */
.text-bg-danger {
    color: #fff !important;
    background-color: #dc3545 !important;
}

/* ============================================
   Styles from templates/layout/default.php
   ============================================ */
.require {
    color: red;
}
.mypage_ff {
    font-family: 'Meiryo UI','メイリオ', Meiryo,'Yu Gothic UI','MS UI Gothic','ＭＳ Ｐゴシック','MS PGothic','ヒラギノ角ゴシック','Hiragino Sans','Hiragino Kaku Gothic ProN','ヒラギノ角ゴ ProN W3','Osaka',sans-serif;
}
/* 妥当性エラーのフィールド */
.form-error {
    background-color: pink;
}
/* 妥当性エラーメッセージ */
.error-message {
    font-size: 80%;
    color: red;
}

/* ============================================
   Styles from templates/element/trial/step3.php
   ============================================ */
/** 見出し */
.blue-heading {
    color: #0068B7;              /* 青字 */
    position: relative;
    padding-left: 1em;           /* 枠と文字の間にスペース */
    display: inline-block;
}
.blue-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0.4em;                /* 幅：文字の半分 */
    height: 100%;                /* 高さ：文字と同じ */
    background-color: #0068B7;   /* ← 塗りつぶし */
}
/** 通常と講習の時間割 */
/** 時間割の枠線 */
.td-border {
    border: 1px solid #0068B7 !important;

}
th.th-timetable {
    width: 5.5em;
}
td.td-border {
    width: 6em;
}
/** 時間割のth */
.th-timetable {
    color: #004B85 !important;
    background-color: #EDF7FF !important;
}
.td-koma {
    cursor: pointer;
    width: 42px;
}
/** 未選択のコマ */
.td-koma-unchecked {
    color: #000000;
}
/** テーブルのセルを縦中央揃え */
.table td, .table th {
    vertical-align: middle;
}
/** 科目名の折り返し */
.td-koma span, #timetable_alert span {
    word-break: break-word;
}

/** Subject checkbox list - Column layout with MAX_SUBJECT_CHECKBOX_ROW items per column */
.subject-checkbox-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    margin-bottom: 8px;
}
.subject-checkbox-column {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 200px;
}
.subject-checkbox-column .form-check {
    word-break: break-word;
    margin-bottom: 3px;
}
.subject-checkbox-column .form-check:last-child {
    margin-bottom: 0;
}
@media (max-width: 768px) {
    .subject-checkbox-container {
        flex-direction: column;
    }
    .subject-checkbox-column {
        min-width: 100%;
        max-width: 100%;
    }
}

/* ============================================
   Custom Select Dropdown (similar to red-reception)
   ============================================ */

/* Custom Select Wrapper */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

/* Display Button (replaces native select appearance) */
.custom-select-display {
    width: 100%;
    min-width: 150px;
    padding: 0.375rem 2.5rem 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    color: #212529;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.custom-select-display:hover {
    border-color: #adb5bd;
}

.custom-select-display:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-select-wrapper.open .custom-select-display {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Dropdown List */
.custom-select-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.custom-select-wrapper.open .custom-select-dropdown {
    display: block;
}

/* Items Container (scrollable area) */
.custom-select-items {
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Dropdown Items */
.custom-select-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    word-break: break-word;
}

.custom-select-item:hover:not(.disabled),
.custom-select-item.highlighted:not(.disabled) {
    background-color: #f8f9fa;
}

.custom-select-item.selected {
    background-color: #e7f3ff;
    font-weight: 500;
}

.custom-select-item.disabled {
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.custom-select-item.disabled:hover {
    background-color: transparent;
}

/* Mobile responsive - height 100px with scroll */
@media (max-width: 768px) {
    .custom-select-items {
        max-height: 200px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .custom-select-item {
        padding: 0.25rem 0.5rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .custom-select-display {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* iPad responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .custom-select-items {
        max-height: 250px;
    }
    
    .custom-select-item {
        padding: 0.25rem 0.5rem;
    }
}
