/**
 * 课程报名模态框样式
 * Version: 4.1.0 - 与修改信息弹窗样式统一
 * 参考：student-info.css
 */

/* ========== 模态框宽度 ========== */
.ardata-enrollment-dialog {
    max-width: 900px;
    width: 90%;
    margin: 1.75rem auto;
}

@media (min-width: 1200px) {
    .ardata-enrollment-dialog {
        max-width: 1000px;
        width: 85%;
    }
}

@media (max-width: 991px) {
    .ardata-enrollment-dialog {
        max-width: 720px;
        width: 92%;
        margin: 1rem auto;
    }
}

@media (max-width: 767px) {
    .ardata-enrollment-dialog {
        max-width: 100%;
        width: 95%;
        margin: 0.5rem auto;
    }
}

/* ========== 模态框内容 ========== */
.ardata-enrollment-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #ffffff;
}

/* ========== 模态框头部 - 与修改信息一致 ========== */
.ardata-enrollment-header {
    background: #ffffff;
    border-bottom: none;
    padding: 20px 30px;
}

.ardata-enrollment-header .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.ardata-enrollment-header .modal-title i {
    color: #667eea;
    font-size: 20px;
}

.ardata-enrollment-header .close {
    color: #999999;
    opacity: 1;
    font-size: 28px;
    font-weight: 300;
    transition: all 0.2s;
    text-shadow: none;
}

.ardata-enrollment-header .close:hover {
    color: #333333;
}

/* ========== 模态框主体 ========== */
.ardata-enrollment-body {
    padding: 30px;
    background: #ffffff;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

@media (max-width: 767px) {
    .ardata-enrollment-body {
        padding: 20px 15px;
    }
}

/* ========== 表单区块 - 与修改信息一致 ========== */
.ardata-enroll-section {
    width: 100%;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e9ecef;
}

.ardata-enroll-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ========== 区块标题 - 与修改信息一致 ========== */
.ardata-section-title {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ardata-section-title i {
    font-size: 18px;
    color: #667eea;
}

/* ========== 表单控件 - 完全统一 ========== */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    color: #1a1a1a !important;
    background: #ffffff !important;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-control::placeholder {
    color: #999999 !important;
    opacity: 1;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #ffffff !important;
    color: #1a1a1a !important;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.text-muted {
    color: #666666 !important;
    font-size: 12px;
    line-height: 1.5;
}

.text-danger {
    color: #e74c3c !important;
    font-weight: 700;
    margin-left: 2px;
}

/* ========== 专业方向网格 ========== */
.ardata-majors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px 16px;
}

@media (min-width: 1200px) {
    .ardata-majors-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 767px) {
    .ardata-majors-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px 12px;
    }
}

@media (max-width: 576px) {
    .ardata-majors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* ========== 专业复选框 - 与修改信息复选框一致 ========== */
.ardata-major-checkbox {
    position: relative;
}

.ardata-major-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.ardata-major-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 400;
    color: #333333;
    text-align: center;
    margin: 0;
    min-height: 40px;
}

.ardata-major-checkbox label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.ardata-major-checkbox input[type="checkbox"]:checked + label {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    font-weight: 600;
}

/* ========== 学习模式单选框 - 与修改信息单选框一致 ========== */
.ardata-learning-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

@media (max-width: 767px) {
    .ardata-learning-modes {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.ardata-mode-radio {
    position: relative;
}

.ardata-mode-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.ardata-mode-radio label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
}

.ardata-mode-radio label i {
    font-size: 28px;
    color: #999999;
    transition: all 0.3s;
}

.ardata-mode-radio label .mode-content {
    flex: 1;
}

.ardata-mode-radio label .mode-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.ardata-mode-radio label .mode-desc {
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
}

.ardata-mode-radio label:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.ardata-mode-radio label:hover i {
    color: #667eea;
}

.ardata-mode-radio input[type="radio"]:checked + label {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.ardata-mode-radio input[type="radio"]:checked + label i {
    color: #667eea;
}

.ardata-mode-radio input[type="radio"]:checked + label .mode-title {
    color: #667eea;
}

/* ========== 模态框底部 ========== */
.ardata-enrollment-footer {
    padding: 20px 30px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 767px) {
    .ardata-enrollment-footer {
        padding: 15px 20px;
    }
}

/* ========== 按钮样式 - 与修改信息按钮一致 ========== */
.ardata-enrollment-footer .btn {
    height: 40px;
    padding: 0 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ardata-enrollment-footer .btn i {
    margin-right: 6px;
    font-size: 14px;
}

.ardata-enrollment-footer .btn-primary {
    background: #667eea;
    color: #ffffff;
}

.ardata-enrollment-footer .btn-primary:hover {
    background: #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ardata-enrollment-footer .btn-secondary {
    background: #f5f5f5;
    color: #666666;
}

.ardata-enrollment-footer .btn-secondary:hover {
    background: #e5e5e5;
    color: #333333;
}

/* ========== 滚动条美化 ========== */
.ardata-enrollment-body::-webkit-scrollbar {
    width: 6px;
}

.ardata-enrollment-body::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.ardata-enrollment-body::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.ardata-enrollment-body::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* ========== 表单行间距 ========== */
.row {
    margin-left: -12px;
    margin-right: -12px;
}

.row > [class*="col-"] {
    padding-left: 12px;
    padding-right: 12px;
}

.mb-3 {
    margin-bottom: 15px !important;
}

/* ========== 小尺寸文本 ========== */
.small {
    font-size: 12px;
    line-height: 1.5;
}

/* ========== 响应式调整 ========== */
@media (max-width: 767px) {
    .ardata-enrollment-header {
        padding: 15px 20px;
    }
    
    .ardata-enrollment-header .modal-title {
        font-size: 16px;
    }
    
    .ardata-section-title {
        font-size: 15px;
    }
    
    .ardata-major-checkbox label {
        font-size: 13px;
        padding: 8px 12px;
        min-height: 36px;
    }
    
    .ardata-mode-radio label {
        padding: 12px 15px;
    }
    
    .ardata-mode-radio label i {
        font-size: 24px;
    }
    
    .ardata-mode-radio label .mode-title {
        font-size: 14px;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.show .ardata-enrollment-content {
    animation: fadeInDown 0.3s ease-out;
}

/* ========== 模态框背景 ========== */
.modal-backdrop.show {
    opacity: 0.5;
}

/* ========== 加载状态 ========== */
.ardata-enrollment-footer .btn-primary.loading {
    position: relative;
    color: transparent;
}

.ardata-enrollment-footer .btn-primary.loading::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    top: 50%;
    left: 50%;
    margin-left: -7px;
    margin-top: -7px;
    border: 2px solid white;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 打印时隐藏 ========== */
@media print {
    #enrollmentModal {
        display: none !important;
    }
}
