/* Admin Page Specific Styles */

/* Admin Section */
.admin-section {
    padding: 3rem 0;
}

/* Admin Card */
.admin-card {
    background-color: var(--color-background-card);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.admin-card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
    position: relative;
}

.admin-card h2 i {
    color: var(--color-accent);
}

.admin-card h2::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 3px;
}

/* Admin Form */
.admin-form {
    margin-top: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background-color: #1a2533;
    border-radius: 8px;
    padding: 2rem;
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    color: #e2e8f0;
}

.admin-form input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.admin-form label[for="sendToApp"] {
    display: flex;
    align-items: center;
    font-weight: normal;
}

/* Admin Dashboard */
.admin-dashboard {
    margin-bottom: 3rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-card-description {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.admin-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.admin-card h3 i {
    color: var(--color-accent);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--color-text-secondary);
}

.data-table th, 
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-background-light);
}

.data-table th {
    font-weight: 600;
    color: var(--color-text-primary);
    background-color: var(--color-background-light);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.status-active {
    color: var(--color-success);
    background-color: rgba(72, 187, 120, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-expired {
    color: var(--color-text-muted);
    background-color: rgba(160, 174, 192, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.no-data-message {
    text-align: center;
    padding: 2rem 0;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Button Styling */
.admin-form .btn {
    min-width: 150px;
    position: relative;
}

.admin-form .button-spinner {
    margin-left: 0.5rem;
}

/* Action buttons in tables */
.announcements-table .btn {
    margin: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.announcements-table .btn-sm {
    min-width: auto;
}

.announcements-table td:last-child {
    white-space: nowrap;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

/* State Selection Styles */
.state-container {
    background-color: #111827;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    width: 100%;
    display: block;
}

.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.state-box {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 12px;
    background-color: #1e293b;
    border: 1px solid #374151;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    overflow: visible;
}

.state-box:hover {
    background-color: #1f2937;
    border-color: #3b82f6;
}

.state-box.selected {
    background-color: #2563eb;
    border-color: #3b82f6;
    color: white;
}

.form-text {
    display: block;
    margin-top: 12px;
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
}

/* Form Group Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e2e8f0;
    font-weight: 500;
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background-color: #1e293b;
    border: 1px solid #374151;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 14px;
}

.form-group textarea:focus,
.form-group select:focus {
    border-color: #3b82f6;
    outline: none;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .admin-section {
        padding: 2rem 0;
    }
    
    .admin-card {
        padding: 1.5rem;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .admin-header h2 {
        margin-bottom: 0;
    }
    
    .admin-header .btn {
        width: 100%;
    }
    
    .table-container {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        width: calc(100% + 3rem);
    }
    
    .data-table th, 
    .data-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .state-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .state-box {
        padding: 10px;
        font-size: 13px;
    }
    
    .state-container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .admin-form .form-actions {
        flex-direction: column;
    }
    
    .admin-form .form-actions .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .state-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 6px;
    }
    
    .state-box {
        padding: 8px;
        font-size: 12px;
    }
    
    .state-container {
        padding: 10px;
    }
}

/* Formatting toolbar styles */
#formatting-toolbar, .formatting-toolbar {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #1e293b;
    border-radius: 6px;
    border: 1px solid #374151;
    overflow-x: auto;
    flex-wrap: wrap;
    gap: 5px;
}

/* Card width fixes */
.card {
    max-width: 800px;
    margin: 0 auto 20px;
}

/* Formatting color buttons */
.format-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    font-weight: bold;
    font-size: 16px;
    padding: 0;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.format-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Help button */
.format-btn.help-btn {
    width: auto !important;
    min-width: 40px;
    padding: 0 10px;
    font-size: 16px;
    background-color: #3b82f6;
    color: white;
    margin-left: 5px;
}

/* Toolbar title */
.toolbar-title {
    color: #e2e8f0;
    margin-right: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* Announcements table styles */
.announcements-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.announcements-table th,
.announcements-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.announcements-table th {
    background-color: rgba(0, 0, 0, 0.2);
    color: #e2e8f0;
    font-weight: 600;
}

.announcements-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.spinner-container {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    color: #f8d7da;
    border: 1px solid rgba(220, 53, 69, 0.5);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #d4edda;
    border: 1px solid rgba(40, 167, 69, 0.5);
} 