/* ===== TURKICONCO 2026 - Enhanced Styles ===== */

/* ===== Custom Modal System ===== */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.custom-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-header i {
    font-size: 2rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a5f7a;
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin: 0;
    line-height: 1.6;
    color: #333;
}

.modal-body ul {
    margin: 10px 0 0 20px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-close {
    background: #159895;
    color: white;
}

.modal-btn-close:hover {
    background: #1a5f7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 152, 149, 0.3);
}

/* Modal Types */
.modal-success .modal-header i {
    color: #28a745;
}

.modal-error .modal-header i {
    color: #dc3545;
}

.modal-warning .modal-header i {
    color: #ffc107;
}

.modal-info .modal-header i {
    color: #17a2b8;
}

.modal-loading .modal-header i {
    color: #159895;
}

.modal-loading .modal-footer {
    display: none;
}

/* ===== Form Error States ===== */
.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

/* ===== Loading Spinner ===== */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    100% {
        transform: rotate(360deg);
    }
}

/* ===== Enhanced File Upload ===== */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    border: 2px dashed #159895;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    border-color: #1a5f7a;
    background: #e8f5f3;
}

.file-label i {
    font-size: 2rem;
    color: #159895;
}

.file-upload input[type="file"]:focus + .file-label {
    outline: 2px solid #159895;
    outline-offset: 2px;
}

.file-preview {
    margin-top: 15px;
    padding: 10px;
    background: #e8f5f3;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-preview i {
    color: #159895;
}

.file-preview .file-name {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.file-preview .file-size {
    color: #666;
    font-size: 0.875rem;
}

.file-preview .remove-file {
    color: #dc3545;
    cursor: pointer;
    padding: 5px 10px;
}

.file-preview .remove-file:hover {
    color: #c82333;
}

/* ===== Enhanced Form Submit Button ===== */
.btn-submit-registration,
.btn-submit-abstract {
    position: relative;
    overflow: hidden;
}

.btn-submit-registration:disabled,
.btn-submit-abstract:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit-registration.loading::after,
.btn-submit-abstract.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid white;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.btn-submit-registration.loading span,
.btn-submit-abstract.loading span {
    opacity: 0;
}

/* ===== Success Message ===== */
.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    color: #155724;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.success-message i {
    font-size: 1.5rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Word Counter Enhanced ===== */
.word-counter {
    margin-top: 10px;
    font-size: 0.875rem;
    color: #666;
    transition: all 0.3s ease;
}

.word-counter.over-limit {
    color: #dc3545;
    font-weight: bold;
}

.word-counter.warning {
    color: #ffc107;
}

/* ===== Form Progress Indicator ===== */
.form-progress {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #159895, #1a5f7a);
    transition: width 0.3s ease;
}

/* ===== Responsive Enhancements ===== */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
    }
}

/* ===== Accessibility Improvements ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #159895;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #159895;
    outline-offset: 2px;
}

/* ============================================ */
/* Program — Hall Tabs                          */
/* ============================================ */
.hall-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(21,152,149,.15);
    flex-wrap: wrap;
}
.hall-tab {
    padding: 8px 20px;
    border: 2px solid rgba(21,152,149,.25);
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hall-tab:hover { border-color: #159895; color: #159895; }
.hall-tab.active {
    background: linear-gradient(135deg,#159895,#0d7377);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(21,152,149,.3);
}
.hall-content { display: none; animation: fadeIn .35s ease; }
.hall-content.active { display: block; }

/* ============================================ */
/* Program — Session Cards                      */
/* ============================================ */
.program-session {
    background: #fff;
    border-radius: 12px;
    border-left: 4px solid #159895;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: box-shadow .25s ease;
}
.program-session:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.session-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.session-header h4 {
    font-size: 1.05rem;
    color: #1a2332;
    margin: 0;
    font-weight: 700;
}
.session-header.session-opening { border-left-color: #d4a017; }
.program-session:has(.session-opening) { border-left-color: #d4a017; }
.program-session:has(.session-special) { border-left-color: #7c3aed; }
.program-session:has(.session-satellite) { border-left-color: #059669; }

.session-time {
    background: linear-gradient(135deg,#159895,#0d7377);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: .3px;
}
.session-opening .session-time { background: linear-gradient(135deg,#d4a017,#b8860b); }
.session-special .session-time { background: linear-gradient(135deg,#7c3aed,#6d28d9); }
.session-satellite .session-time { background: linear-gradient(135deg,#059669,#047857); }

/* Session Chairs */
.session-chairs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: .88rem;
    color: #64748b;
}
.session-chairs > span:first-child {
    font-weight: 600;
    color: #475569;
}
.chair-name {
    background: rgba(21,152,149,.08);
    padding: 3px 12px;
    border-radius: 16px;
    font-weight: 500;
    color: #334155;
}
.chair-name small { color: #94a3b8; font-weight: 400; }

/* Session Speakers List (chips) */
.session-speakers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.speaker-chip {
    background: rgba(21,152,149,.06);
    border: 1px solid rgba(21,152,149,.15);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 500;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Session Talks */
.session-talks {
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}
.talk-item {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed #f1f5f9;
    align-items: flex-start;
}
.talk-item:last-child { border-bottom: none; }
.talk-time {
    color: #159895;
    font-size: .82rem;
    font-weight: 600;
    min-width: 100px;
    padding-top: 2px;
    white-space: nowrap;
}
.talk-info { flex: 1; }
.talk-title {
    font-weight: 600;
    color: #1a2332;
    margin: 0 0 4px;
    font-size: .92rem;
    line-height: 1.4;
}
.talk-speaker {
    color: #64748b;
    font-size: .85rem;
    margin: 0 0 2px;
}
.talk-speaker small { color: #94a3b8; }
.talk-speaker em { color: #7c3aed; font-style: normal; font-weight: 500; }
.talk-panel {
    color: #94a3b8;
    font-size: .82rem;
    margin: 4px 0 0;
    line-height: 1.5;
}

/* Master Class cards updated */
.mc-speakers {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    font-size: .85rem;
}
.mc-speakers li {
    padding: 4px 0;
    color: #475569;
    border-bottom: 1px dashed #f1f5f9;
}
.mc-speakers li:last-child { border-bottom: none; }
.mc-speakers li strong { color: #1a2332; }
.speaker-country { color: #94a3b8; font-size: .8rem; }
.masterclass-card p { font-size: .82rem; color: #94a3b8; margin-top: 2px; }

/* ============================================ */
/* Responsive                                   */
/* ============================================ */
@media (max-width: 768px) {
    .hall-tabs { gap: 6px; }
    .hall-tab { padding: 6px 14px; font-size: .82rem; }
    .session-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .talk-item { flex-direction: column; gap: 4px; }
    .talk-time { min-width: unset; }
    .program-session { padding: 16px; }
}

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