/**
 * Component Styles
 * 
 * This file contains styles for UI components that were previously inline
 * in PHP files. All styling should be done through CSS classes, not inline styles.
 */

/* ========================================
 * MESSAGE BOXES
 * ======================================== */

/* Success Message Box */
.message-box-success {
    background: #dcfce7;
    color: #15803d;
    border: 2px solid #86efac;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.message-box-success p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Warning Message Box */
.message-box-warning {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #fcd34d;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Info Message Box */
.message-box-info {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #93c5fd;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* ========================================
 * PAGE TITLES & HEADERS
 * ======================================== */

/* Auth Page Title */
.auth-title {
    text-align: center;
    margin-bottom: 1rem;
    color: #374151;
}

/* Auth Page Subtitle */
.auth-subtitle {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Access Denied Page Title */
.access-denied-title {
    font-size: 0.85rem;
}

/* ========================================
 * NAVIGATION & LINKS
 * ======================================== */

/* Back Link Container */
.back-link-container {
    margin-top: 1.5rem;
}

/* Debug/Test Page Link */
.debug-link {
    margin-top: 20px;
}

/* ========================================
 * MODAL COMPONENTS
 * ======================================== */

/* Modal with display none (initial state) */
.modal-hidden {
    display: none;
}

/* Medium sized modal */
.modal-medium {
    max-width: 500px;
}

/* ========================================
 * FORM ELEMENTS
 * ======================================== */

/* Hidden file input */
.file-input-hidden {
    display: none;
}

/* Form message container */
.form-message-hidden {
    display: none;
}

/* Upload progress container */
.upload-progress-hidden {
    display: none;
}

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

/* Narrow column (for icons/buttons) */
.table-col-narrow {
    width: 40px;
}

/* ========================================
 * RTL SUPPORT (Persian/Arabic)
 * ======================================== */

/* RTL form adjustments */
[dir="rtl"] .form-group label {
    text-align: right;
}

[dir="rtl"] .toggle-password {
    right: auto;
    left: 12px;
}

[dir="rtl"] .password-wrapper input {
    padding-right: 1rem;
    padding-left: 4rem;
}

/* ========================================
 * ROLE UPDATE MESSAGE
 * ======================================== */

.role-update-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.role-update-message.success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    display: block;
}

.role-update-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* ========================================
 * IFRAME CONTAINER
 * ======================================== */

.iframe-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========================================
 * LEGEND/STATUS INDICATORS
 * ======================================== */

.legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    font-size: 0.875rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.legend-dot.upload {
    background-color: var(--primary-light);
}

.legend-dot.has-file {
    background-color: var(--success);
}

/* ========================================
 * PRINT STYLES
 * ======================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    .message-box-success,
    .message-box-warning,
    .message-box-info {
        border: 1px solid #000;
        background: #fff;
        color: #000;
    }
}
