
.header {margin-top: 0vw;}

.submain{
    height: 100vh; 

}


        .container {
            width: 35vw;
            margin: 0 auto;
            padding: 25px;
            box-shadow: 0px 0px 20px #00000020;
            border-radius: 12px;
            background-color: white;
            min-width: 500px;
            transition: all 0.3s ease;
        }
        
        .step {
            display: none;
        }
        
        .step.active {
            display: block;
            position: relative;
            min-height: 300px;
            animation: fadeIn 0.3s ease;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .form-group {
            width: 100%;
            margin-top: 15px;
            margin-bottom: 15px;
        }
        
        .form-group label {
            display: block;
            font-weight: bold;
            margin-bottom: 5px;
            color: #333;
            font-size: 15px;
        }
        
        .form-group input, .form-group select, .form-group textarea {
            width: 100%;
            border: 1.5px solid rgba(128, 128, 128, 0.418);
            padding: 12px;
            font-size: 16px;
            border-radius: 6px;
            box-sizing: border-box;
            font-family: inherit;
            transition: border-color 0.3s;
        }
        
        .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
            border-color: rgb(0, 70, 155);
            outline: none;
        }
        
        select[multiple] {
            height: 200px;
        }
        
        .mobile-date-select {
            display: none;
        }
        
        .date-option {
            display: block;
            padding: 12px;
            margin: 8px 0;
            background-color: #f8f9fa;
            border: 2px solid #dee2e6;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .date-option:hover {
            background-color: #e9ecef;
        }
        
        .date-option.selected {
            background-color:  rgb(0,70,155);
            color: white;
            border-color: rgb(5, 85, 183);
        }
        
        .selected-dates {
            margin-top: 10px;
            padding: 12px;
            background-color: #f5f5f5;
            border-radius: 6px;
            border: 1px dashed #ccc;
        }
        
        .selected-dates ul {
            margin: 5px 0;
            padding-left: 20px;
        }
        
        .selected-dates li {
            margin-bottom: 5px;
        }
        
        button.next-btn, button.submit-btn {
            float: right;
            background-color:  rgb(0,70,155);
            color: white;
            padding: 12px 24px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            margin-top: 20px;
            margin-left: 10px;
            transition: all 0.3s;
            font-weight: 600;
        }
        
        button.previous-btn {
            float: left;
            background-color: #6c757d;
            color: white;
            padding: 12px 24px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            margin-top: 20px;
            transition: all 0.3s;
            font-weight: 600;
        }
        
        button:hover {
            opacity: 0.9;
        }

        
        .date-page h3 {
            color: #2c3e50;
            border-bottom: 2px solid rgb(0,70,155);
            padding-bottom: 10px;
            margin-bottom: 25px;
            font-size: 20px;
        }
        
        .trainer-group {
            background-color: #f8f9fa;
            padding: 18px;
            border-radius: 8px;
            margin-bottom: 25px;
            border-left: 4px solid  rgb(0,70,155);
        }
        
        .trainer-group h4 {
            margin-top: 0;
            color: #2c3e50;
            font-size: 18px;
            margin-bottom: 15px;
        }
        
        .trainer-info {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            margin-bottom: 15px;
            padding: 12px;
            background-color: white;
            border-radius: 6px;
            border: 1px solid #ddd;
        }
        
        .trainer-name {
            font-weight: bold;
            color: #333;
            font-size: 16px;
        }
        
        .trainer-hours {
            color: #666;
            font-size: 15px;
        }
        
        .time-slots {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 10px;
            margin-top: 15px;
        }
        
        .time-slot {
            padding: 12px 8px;
            background-color: white;
            border: 2px solid #ddd;
            border-radius: 6px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 14px;
            position: relative;
        }
        
        .time-slot:hover {
            background-color: #f0f0f0;
            border-color:  rgb(0,70,155);
        }
        
        .time-slot.selected {
            background-color:  rgb(0,70,155);
            color: white;
            border-color:  rgb(5, 85, 183);
            font-weight: bold;
        }
        
        .slot-checkbox {
            position: absolute;
            top: 5px;
            right: 5px;
            width: 16px;
            height: 16px;
        }
        
        .navigation-buttons {
            display: flex;
            justify-content: space-between;
            margin-top: 40px;
            padding-top: 20px;
            border-top: 1px solid #eee;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .time-selection-summary {
            background-color: #e8f5e9;
            padding: 15px;
            border-radius: 6px;
            margin-top: 20px;
            font-size: 15px;
            display: none;
            border-left: 4px solid rgb(5, 85, 183);
        }
        
        textarea {
            resize: vertical;
            min-height: 100px;
        }
        
        .error {
            border-color: #f44336 !important;
            background-color: #fff5f5;
        }
        
        .error-message {
            color: #f44336;
            font-size: 14px;
            margin-top: 5px;
            display: none;
        }
        
        h2 {
            color: #2c3e50;
            margin-top: 0;
            margin-bottom: 25px;
            font-size: 24px;
        }
        
        .form-instruction {
            font-size: 13px;
            color: #666;
            margin-top: 5px;
            margin-bottom: 15px;
        }
        
        .session-list {
            margin-top: 10px;
            padding-left: 0;
        }
        
        .session-item {
            margin-bottom: 10px;
            padding: 12px;
            background-color: #f8f9fa;
            border-radius: 6px;
            border-left: 4px solid rgb(0, 70, 155);
        }
        
        .session-time {
            font-weight: bold;
            color: #2c3e50;
            font-size: 16px;
            margin-bottom: 5px;
        }
        
        .session-trainer {
            color: #2c3e50;
            font-size: 15px;
            margin-bottom: 3px;
        }
        
        .session-date {
            font-size: 14px;
            color: #666;
        }
        
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid rgb(0, 70, 155);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-right: 10px;
            vertical-align: middle;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .success-message {
            text-align: center;
            padding: 40px 20px;
        }
        
        .success-icon {
            font-size: 80px;
            color: #4CAF50;
            margin-bottom: 20px;
        }
        
        @media (max-width: 1440px) {
            .container {
                width: 45vw;
                padding: 22px;
            }
            
            .time-slots {
                grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            }
            button.next-btn, button.submit-btn, button.previous-btn {
                padding: 10px 20px;
                font-size: 16px;
                height:5vw;
                width:15vw
            }
        }
        
        @media (max-width: 992px) {
            .container {
                width: 70vw;
                min-width: 600px;
                padding: 20px;
            }
            
            .time-slots {
                grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            }
            
            .trainer-info {
                flex-direction: column;
                gap: 8px;
            }
            button.next-btn, button.submit-btn, button.previous-btn {
                padding: 10px 20px;
                font-size: 16px;
                height:5vw;
                width:25vw
            }
        }
        
        @media (max-width: 768px) {
            body {
                padding: 0px;
            }
            
            .container {
                width: 85vw !important;
                min-width: unset !important;
             
                padding: 18px;
                margin: 0 auto;
            }
            
            .desktop-date-select {
                display: none;
            }
            
            .mobile-date-select {
                display: block;
            }
            
            .time-slots {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }
            
            .time-slot {
                padding: 10px 6px;
                font-size: 13px;
            }
            
            h2 {
                font-size: 22px;
            }
            
            .date-page h3 {
                font-size: 18px;
            }
            
            button.next-btn, button.submit-btn, button.previous-btn {
                padding: 10px 20px;
                font-size: 16px;
                height:9vw;
                width:25vw
            }
            
            .trainer-group {
                padding: 15px;
            }
        }
        
        @media (max-width: 576px) {
  
            
            body {
                padding: 0px;
            }
            
            .container {
                width: 85vw !important;
                
            }
            
            .time-slots {
                grid-template-columns: 1fr;
            }
            
            .form-group input, .form-group select, .form-group textarea {
                padding: 10px;
                font-size: 15px;
            }
            
            select[multiple] {
                height: 120px;
            }
            
            h2 {
                font-size: 20px;
                margin-bottom: 20px;
            }
            
            .date-page h3 {
                font-size: 17px;
                padding-bottom: 8px;
                margin-bottom: 20px;
            }
            
            .trainer-group h4 {
                font-size: 16px;
            }
            
            .trainer-name, .trainer-hours {
                font-size: 15px;
            }
            
            .navigation-buttons {
                flex-direction: column;
                gap: 10px;
            }
            
            button.next-btn, button.submit-btn, button.previous-btn {
                width: 100%;
                margin: 5px 0;
                text-align: center;
                height:10vw;
            }
            
            button.previous-btn {
                order: 2;
            }
            
            button.next-btn, button.submit-btn {
                order: 1;
            }
        }
        
        @media (max-width: 400px) {
         .container {
                width: 85vw !important;
                
            }
            
            body {
                padding: 0px;
            }
            .form-group {
                margin-top: 12px;
                margin-bottom: 12px;
            }
            
            .form-group label {
                font-size: 14px;
            }
            
            .form-group input, .form-group select, .form-group textarea {
                padding: 8px;
                font-size: 14px;
            }
            
            h2 {
                font-size: 18px;
                margin-bottom: 18px;
            }
            
            .date-page h3 {
                font-size: 16px;
            }
            
            .trainer-group {
                padding: 12px;
            }
            
            .trainer-group h4 {
                font-size: 15px;
                margin-bottom: 12px;
            }
            
            button.next-btn, button.submit-btn, button.previous-btn {
                height:12vw;
                padding: 8px 16px;
                font-size: 14px;
            }
            
            .time-selection-summary {
                padding: 10px;
                font-size: 13px;
            }
            
            .date-option {
                padding: 10px;
                font-size: 14px;
            }
        }
        
        @media (max-width: 350px) {
              .container {
                width: 85vw !important;
                
            }
            
            
            body {
                padding: 0px;
            }
            
            .form-group input, .form-group select, .form-group textarea {
                padding: 7px;
                font-size: 13px;
            }
            
            h2 {
                font-size: 17px;
            }
            
            .date-page h3 {
                font-size: 15px;
            }
            
            .trainer-group h4 {
                font-size: 14px;
            }
            
            .trainer-name, .trainer-hours {
                font-size: 14px;
            }
            
            .time-slot {
                padding: 8px 4px;
                font-size: 12px;
            }
            
            select[multiple] {
                height: 100px;
            }
            
            .date-option {
                padding: 8px;
                font-size: 13px;
            }
            button.next-btn, button.submit-btn, button.previous-btn {
                height:20vw;
                font-size: 14px;
            }
        }


/* Стили для занятых и конфликтных слотов */
.time-slot.occupied {
    background-color: #ffebee !important;
    color: #c62828 !important;
    border-color: #ef9a9a !important;
    cursor: not-allowed !important;
}

.time-slot.conflict {
    background-color: #fff3e0 !important;
    color: #ef6c00 !important;
    border-color: #ffcc80 !important;
}

.time-slot.occupied.selected,
.time-slot.conflict.selected {
    background-color: #00469b !important;
    color: white !important;
    border-color: #0055b7 !important;
}

.occupied-badge,
.conflict-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.occupied-badge {
    background-color: #c62828;
    color: white;
}

.conflict-badge {
    background-color: #ef6c00;
    color: white;
}

.time-slot {
    position: relative;
    padding-top: 20px !important;
}

/* Адаптивные стили для бейджей */
@media (max-width: 768px) {
    .occupied-badge,
    .conflict-badge {
        font-size: 8px;
        padding: 0 2px;
    }
    
    .time-slot {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }
}

.no-slots-message {
    color: #ff9800;
    font-style: italic;
    padding: 10px;
    background-color: #fff3e0;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
}