/* ========================================
   BASE STYLES
======================================== */

body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    grid-column: 1 / -1;
}

/* ========================================
   LAYOUT COMPONENTS
======================================== */

.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.preview-section {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
}

.section {
    border: 1px solid #eee;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    background: white;
}

.section h3 {
    margin-top: 0;
    color: #333;
}

/* ========================================
   FORM COMPONENTS
======================================== */

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], 
input[type="email"], 
textarea, 
select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    height: 80px;
    resize: vertical;
}

textarea#abstract {
    height: 120px;
}

textarea#authors_affiliations {
    height: 100px;
}

input[type="file"] {
    width: 100%;
    padding: 5px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* ========================================
   BUTTON STYLES
======================================== */

.btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn:disabled {
    pointer-events: auto;
}

#submitBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #6c757d;
}

#submitBtn:disabled:hover {
    background-color: #6c757d;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-group .btn {
    flex: 1;
}

/* ========================================
   TABLE STYLES (Dashboard)
======================================== */

.table-container {
    overflow-x: auto;
    margin: -1rem;
    padding: 1rem;
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.submissions-table th {
    background: #f8f9fa;
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.submissions-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.submissions-table tr:hover {
    background-color: #f8f9fa;
}

/* Dashboard Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
    text-align: center;
    min-width: 50px;
    white-space: nowrap;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-small:hover {
    opacity: 0.8;
    text-decoration: none;
    color: white;
}


/* ========================================
   BADGE STYLES
======================================== */

.duration-badge {
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.session-badge {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.not-assigned-badge {
    background: #ffc107;
    color: #212529;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-accepted {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   TABLE CELL STYLES
======================================== */

.date-cell {
    font-size: 0.8rem;
    color: #666;
}

.comments-cell {
    text-align: center;
}

.comment-indicator {
    font-size: 16px;
    cursor: help;
}

/* ========================================
   ALERT & MESSAGE STYLES
======================================== */

.flash-messages {
    margin-bottom: 20px;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.submit-success-message {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: #e7f3ff;
    border: 1px solid #007bff;
    border-radius: 4px;
    color: #007bff;
}

.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.error {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}

.success {
    color: green;
    background: #d4edda;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ========================================
   PREVIEW STYLES
======================================== */

.preview-iframe {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    font-size: 18px;
}

/* ========================================
   HELPER STYLES
======================================== */

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    font-style: italic;
}

.format-example {
    background: #f1f3f4;
    padding: 10px;
    border-left: 3px solid #1976d2;
    margin-top: 5px;
    font-family: monospace;
    font-size: 12px;
}

/* Comments styles */
.comments-indicator {
    color: #f39c12;
    font-size: 16px;
    cursor: help;
}

.comments-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px;
    margin-top: 15px;
}

.comments-box p {
    margin: 0;
}

.comments-box .comment-text {
    margin: 5px 0 0 0;
    font-style: italic;
    color: #856404;
}

/* ========================================
   INTERACTIVE EFFECTS
======================================== */

.session-block:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.session-badge:hover, .extra-badge:hover {
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.session-badge:hover {
    background: #e7f3ff;
}

.extra-badge:hover {
    background: #fff3e0;
}

.presentation-item:hover {
    background: rgba(0,123,255,0.2);
    transition: background 0.2s ease;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    body {
        padding: 10px;
    }
    
    .form-section,
    .preview-section {
        padding: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Dashboard responsive */
    .action-buttons {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .btn-small {
        width: 100%;
        min-width: auto;
    }
    
    .submissions-table th,
    .submissions-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
}

.figure-status {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 5px;
    font-size: 14px;
    color: #155724;
}

.figure-status::before {
    content: "✓ ";
    font-weight: bold;
}