/* ==============================
   Select Time Page
   ============================== */

/* Header */
.select-time-header {
    position: relative;
    background: linear-gradient(135deg, #1a3a6b 0%, #2a5298 50%, #1e4db7 100%);
    padding: 5rem 0 3.5rem;
    overflow: hidden;
}

.select-time-header-deco { position: absolute; inset: 0; pointer-events: none; }

.st-deco-circle {
    position: absolute;
    border-radius: 50%;
    background: #fff;
    opacity: 0.07;
}
.st-deco-1 { width: 420px; height: 420px; top: -160px; right: -60px; }
.st-deco-2 { width: 260px; height: 260px; bottom: -110px; left: 3%; }
.st-deco-3 { width: 130px; height: 130px; top: 30px; left: 38%; opacity: 0.04; }

.st-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    font-size: 1.8rem;
    color: #fff;
}

.select-time-header h1 { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.st-header-lead { color: rgba(255,255,255,0.88); font-size: 1.05rem; margin: 0; }

/* Step bar */
.step-bar {
    position: relative;
    background: linear-gradient(180deg, #dce8fb 0%, #edf3fd 45%, #f5f8ff 100%);
    padding: 1.4rem 0 1.2rem;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(42,82,152,0.10);
    border-bottom: 1px solid rgba(42,82,152,0.10);
}

/* 左右の斜めライン装飾 */
.step-bar::before,
.step-bar::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 220px;
    background: linear-gradient(135deg, rgba(42,82,152,0.06) 25%, transparent 25%,
                transparent 50%, rgba(42,82,152,0.06) 50%, rgba(42,82,152,0.06) 75%,
                transparent 75%);
    background-size: 14px 14px;
    pointer-events: none;
}
.step-bar::before { left: 0; }
.step-bar::after  { right: 0; transform: scaleX(-1); }

.step-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    z-index: 1;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.step-circle {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    border: 2px solid #c5d5ef;
    color: #99aac7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(42,82,152,0.08);
}

.step-item.active .step-circle {
    background: linear-gradient(135deg, #2a5298, #1e4db7);
    border-color: #1e4db7;
    color: #fff;
    box-shadow: 0 4px 14px rgba(42,82,152,0.40);
    transform: scale(1.08);
}

.step-item.done .step-circle {
    background: linear-gradient(135deg, #28a745, #1fa83a);
    border-color: #1fa83a;
    color: #fff;
    box-shadow: 0 3px 10px rgba(40,167,69,0.35);
}

.step-label {
    font-size: 0.72rem;
    color: #8ea8cc;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.step-item.active .step-label {
    color: #2a5298;
    font-weight: 700;
}
.step-item.done .step-label { color: #28a745; font-weight: 600; }

.step-connector {
    width: 70px;
    height: 2px;
    background: linear-gradient(90deg, #c5d5ef, #d8e5f5);
    margin: 0 0.6rem;
    margin-bottom: 1.6rem;
    border-radius: 2px;
}

.step-connector.done {
    background: linear-gradient(90deg, #28a745, #5cb85c);
}

/* Selected slot bar */
.selected-slot-bar {
    background: linear-gradient(90deg, rgba(42,82,152,0.1), rgba(30,77,183,0.05));
    border-left: 4px solid #2a5298;
    border-radius: 0 10px 10px 0;
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2a5298;
    margin-bottom: 1.2rem;
}

/* Time slots container (reuse existing classes) */
.time-slots-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

/* Month pager (shared styles already in new-graduate-application.css
   but we redefine here for independence) */
.month-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border: 1px solid #e9ecef;
}

.month-pager-btn {
    padding: 0.45rem 1.2rem;
    border-radius: 25px;
    border: 2px solid #dee2e6;
    background: white;
    color: #5a6a7a;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s;
}

.month-pager-btn:hover { border-color: #2a5298; color: #2a5298; }

.month-pager-btn.active {
    background: linear-gradient(135deg, #2a5298, #1e4db7);
    border-color: #2a5298;
    color: white;
    box-shadow: 0 3px 10px rgba(42,82,152,0.3);
}

.month-content { animation: fadeInMonth 0.25s ease; }

@keyframes fadeInMonth {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Date group */
.date-group { margin-bottom: 1.5rem; }

.date-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, rgba(42,82,152,0.1), rgba(30,77,183,0.04));
    border-left: 4px solid #2a5298;
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.75rem;
}

.date-group-label { font-size: 0.95rem; font-weight: 700; color: #2a5298; }

.date-group-count {
    font-size: 0.78rem;
    color: #7f8c8d;
    background: rgba(42,82,152,0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

/* Time slot cards */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.time-slot-card {
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.time-slot-card:hover {
    border-color: #2a5298;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42,82,152,0.15);
}

.time-slot-card.selected {
    border-color: #2a5298;
    background: linear-gradient(135deg, rgba(42,82,152,0.08), rgba(30,77,183,0.04));
}

.time-slot-card.selected::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 8px; right: 12px;
    color: #2a5298;
    font-size: 1rem;
}

.time-slot-date { font-size: 0.85rem; font-weight: 600; color: #2c3e50; margin-bottom: 0.3rem; }
.time-slot-time { font-size: 1rem; color: #2a5298; font-weight: 700; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #adb5bd;
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.empty-state h4 { font-size: 1.1rem; color: #6c757d; }

@media (max-width: 576px) {
    .time-slots-grid { grid-template-columns: 1fr 1fr; }
    .step-connector { width: 30px; }
    .step-label { font-size: 0.65rem; }
}

/* ==============================
   Custom Time Section
   ============================== */
.custom-time-panel {
    background: #fff;
    border: 2px dashed #b8ccec;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s;
}
.custom-time-panel.open { border-color: #2a5298; border-style: solid; }

.custom-time-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.3rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    gap: 1rem;
    text-align: left;
}
.custom-time-toggle:hover { background: #f5f8ff; }

.custom-toggle-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.custom-toggle-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f0fe, #d0e0fb);
    border: 1.5px solid #b8ccec;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2a5298;
    font-size: 1rem;
    flex-shrink: 0;
}
.custom-toggle-title {
    font-weight: 700;
    color: #2a5298;
    font-size: 1rem;
}
.custom-toggle-sub {
    font-size: 0.8rem;
    color: #7a9cc5;
    margin-top: 0.15rem;
}
.custom-toggle-arrow {
    color: #7a9cc5;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.custom-toggle-arrow.open { transform: rotate(180deg); }

.custom-time-body {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid #e8f0fb;
}

/* Slot row */
.custom-slot-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: #f5f8ff;
    border: 1.5px solid #d0e0fb;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.custom-slot-num {
    background: linear-gradient(135deg, #2a5298, #1e4db7);
    color: #fff;
    border-radius: 50%;
    width: 26px; height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.custom-slot-date {
    flex: 0 0 auto;
}
.custom-slot-date input[type="date"] {
    border: 1.5px solid #c5d5ef;
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
    color: #2c3e50;
    background: #fff;
    cursor: pointer;
}
.custom-slot-sep {
    color: #7a9cc5;
    font-weight: 600;
    padding: 0 0.2rem;
}
.custom-slot-time select {
    border: 1.5px solid #c5d5ef;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    color: #2c3e50;
    background: #fff;
    cursor: pointer;
}
.custom-slot-del {
    margin-left: auto;
    background: none;
    border: none;
    color: #c0b0b0;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.custom-slot-del:hover { color: #e74c3c; background: #fdf0f0; }

.custom-add-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
}
.custom-add-btn {
    background: none;
    border: 2px dashed #b8ccec;
    border-radius: 8px;
    color: #2a5298;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.custom-add-btn:hover { background: #f0f6ff; border-color: #2a5298; }
.custom-add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.custom-add-hint { font-size: 0.78rem; color: #aab8cc; }

/* apply_combined 側のカスタム表示カード */
.custom-time-card {
    background: linear-gradient(135deg, #f0f6ff, #e8f0fb);
    border: 1.5px solid #b8ccec;
    border-radius: 14px;
    overflow: hidden;
}
.custom-time-header {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.2rem;
    font-weight: 700;
    color: #2a5298;
    background: linear-gradient(135deg, #dce8fb, #e8f0fb);
    border-bottom: 1px solid #c5d5ef;
    font-size: 0.95rem;
}
.custom-time-change {
    margin-left: auto;
    font-size: 0.8rem;
    color: #5a7cc8;
    text-decoration: none;
}
.custom-time-change:hover { color: #2a5298; text-decoration: underline; }
.custom-time-slots { padding: 0.7rem 1.2rem; }
.custom-slot-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed #d0e0fb;
}
.custom-slot-row:last-child { border-bottom: none; }
.custom-slot-badge {
    background: linear-gradient(135deg, #2a5298, #1e4db7);
    color: #fff;
    border-radius: 20px;
    padding: 0.15rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}
.custom-slot-text { font-size: 0.9rem; color: #2c3e50; }
.custom-time-note {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    color: #7a9cc5;
    background: rgba(255,255,255,0.6);
    border-top: 1px solid #d8e8fb;
}
