/* ===================================
   UTILITY CLASSES - Modern CSS Utilities
   =================================== */

/* ===================================
   CSS VARIABLES FOR FLEXIBILITY
   =================================== */

:root {
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* ===================================
   VISIBILITY UTILITIES
   =================================== */

/* Hide element completely */
.hidden {
    display: none !important;
}

/* Modal overlay needs flex when visible */
.modal-overlay:not(.hidden) {
    display: flex;
}

/* Visually hide but keep accessible to screen readers */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===================================
   POSITIONING UTILITIES
   =================================== */

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

/* ===================================
   SPACING UTILITIES
   =================================== */

.mt-8 {
    margin-top: var(--spacing-sm);
}

.mt-16 {
    margin-top: var(--spacing-md);
}

.mt-24 {
    margin-top: var(--spacing-lg);
}

.mb-8 {
    margin-bottom: var(--spacing-sm);
}

.mb-24 {
    margin-bottom: var(--spacing-lg);
}

/* ===================================
   TEXT UTILITIES
   =================================== */

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

.text-secondary {
    color: var(--text-secondary);
    font-size: 14px;
}

.text-16 {
    font-size: 16px;
}

.error-text {
    color: var(--red);
}

/* ===================================
   MODAL VARIANTS
   =================================== */

.modal-content--narrow {
    max-width: 450px;
}

.modal-content--medium {
    max-width: 550px;
}

.modal-content--wide {
    max-width: 650px;
}

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

.badge-notification {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--red);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
}

.badge-notification.show {
    display: flex;
}

/* Dark mode support for badges */
body.dark-mode .badge-notification {
    background-color: var(--red);
    color: white;
}

/* ===================================
   ICON SPACING
   =================================== */

.icon-spacing {
    margin-right: var(--spacing-sm);
}

/* ===================================
   FORM SPACING
   =================================== */

.form-spacing {
    margin-top: var(--spacing-md);
}

.form-spacing-lg {
    margin-top: var(--spacing-lg);
}

/* ===================================
   FLEX UTILITIES
   =================================== */

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-8 {
    gap: var(--spacing-sm);
}

.gap-12 {
    gap: var(--spacing-md);
}

.gap-16 {
    gap: var(--spacing-md);
}

/* ===================================
   STATUS MESSAGE UTILITIES
   =================================== */

.status-message-hidden {
    display: none !important;
    margin-top: var(--spacing-md);
}

/* ===================================
   MODAL UTILITY CLASSES
   =================================== */

.modal-header-default {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body-no-padding {
    padding: 0;
}

.sync-progress-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: var(--spacing-sm);
}

.sync-summary-default {
    margin-top: 20px;
    padding: var(--spacing-md);
    background: var(--bg-secondary, var(--background-light));
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.sync-form-status-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.status-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.form-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.status-text {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: right;
    flex-shrink: 0;
}

/* ===================================
   ERROR MESSAGE UTILITIES
   =================================== */

.error-message {
    color: var(--red);
}

.status-message-hidden.show {
    display: block !important;
}

/* ===================================
   RESPONSIVE UTILITIES
   =================================== */

@media (max-width: 768px) {
    .hidden-mobile {
        display: none !important;
    }
    
    .hidden-desktop {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .hidden-mobile {
        display: block !important;
    }
    
    .hidden-desktop {
        display: none !important;
    }
}

