/* ========================================
   SFON MODERN COMPONENTS
   Reusable, consistent component library
   ======================================== */

/* ========================================
   1. BUTTONS - Modern & Animated
   ======================================== */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:active {
    transform: scale(0.95);
}

/* Button Variants */
.btn-primary-modern {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary-modern:hover {
    box-shadow: var(--shadow-xl), var(--shadow-primary);
    transform: translateY(-3px);
}

.btn-accent-modern {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-accent);
}

.btn-accent-modern:hover {
    box-shadow: var(--shadow-xl), var(--shadow-accent);
    transform: translateY(-3px);
}

.btn-outline-modern {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-modern:hover {
    background: var(--color-primary);
    color: white;
}

.btn-ghost-modern {
    background: transparent;
    color: var(--color-primary);
}

.btn-ghost-modern:hover {
    background: rgba(156, 39, 176, 0.1);
}

/* Button Sizes */
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-sm); }
.btn-lg { padding: var(--space-6) var(--space-12); font-size: var(--text-lg); }
.btn-xl { padding: var(--space-8) var(--space-16); font-size: var(--text-xl); }

/* ========================================
   2. CARDS - Premium Glass Design
   ======================================== */
.card-modern {
    background: var(--glass-white);
    backdrop-filter: var(--blur-md);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-rainbow);
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.card-modern:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
}

.card-modern:hover::before {
    transform: scaleX(1);
}

.card-modern-header {
    margin-bottom: var(--space-6);
}

.card-modern-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.card-modern-body {
    color: var(--neutral-700);
    line-height: var(--leading-relaxed);
}

.card-modern-footer {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ========================================
   3. BADGES & TAGS
   ======================================== */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-700);
}

.badge-accent {
    background: var(--accent-100);
    color: var(--accent-700);
}

.badge-success {
    background: var(--success-50);
    color: var(--success-700);
}

.badge-warning {
    background: var(--warning-50);
    color: var(--warning-700);
}

/* ========================================
   4. FORMS - Modern & Accessible
   ======================================== */
.form-group-modern {
    margin-bottom: var(--space-6);
}

.form-label-modern {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--neutral-700);
    margin-bottom: var(--space-2);
}

.form-control-modern {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--neutral-900);
    background: white;
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(156, 39, 176, 0.1);
}

.form-control-modern.is-invalid {
    border-color: var(--color-error);
}

.form-control-modern.is-valid {
    border-color: var(--color-success);
}

/* ========================================
   5. NAVIGATION - Smooth & Responsive
   ======================================== */
.nav-modern {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item-modern {
    position: relative;
}

.nav-link-modern {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-weight: var(--font-medium);
    color: var(--neutral-700);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.nav-link-modern:hover {
    color: var(--color-primary);
    background: var(--primary-50);
}

.nav-link-modern.active {
    color: var(--color-primary);
    background: var(--primary-100);
    font-weight: var(--font-semibold);
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transform: translateX(-50%);
    transition: width var(--transition-base);
}

.nav-link-modern:hover::after,
.nav-link-modern.active::after {
    width: 80%;
}

/* ========================================
   6. MODALS - Modern & Accessible
   ======================================== */
.modal-modern {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    z-index: var(--z-modal);
    overflow: hidden;
}

.modal-modern.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid var(--neutral-200);
}

.modal-title-modern {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
}

.modal-close-modern {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--neutral-100);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.modal-close-modern:hover {
    background: var(--neutral-200);
    transform: rotate(90deg);
}

.modal-body-modern {
    padding: var(--space-6);
    overflow-y: auto;
}

.modal-footer-modern {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding: var(--space-6);
    border-top: 1px solid var(--neutral-200);
}

/* ========================================
   7. ALERTS & NOTIFICATIONS
   ======================================== */
.alert-modern {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    animation: slideInRight var(--duration-medium) var(--ease-out);
}

.alert-success {
    background: var(--success-50);
    border-color: var(--success-500);
    color: var(--success-700);
}

.alert-warning {
    background: var(--warning-50);
    border-color: var(--warning-500);
    color: var(--warning-700);
}

.alert-error {
    background: var(--error-50);
    border-color: var(--error-500);
    color: var(--error-700);
}

.alert-info {
    background: var(--info-50);
    border-color: var(--info-500);
    color: var(--info-700);
}

/* ========================================
   8. PROGRESS INDICATORS
   ======================================== */
.progress-modern {
    width: 100%;
    height: 12px;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-fill-modern {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--duration-slow) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.progress-fill-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

/* ========================================
   9. LOADING SPINNERS
   ======================================== */
.spinner-modern {
    width: 40px;
    height: 40px;
    border: 4px solid var(--neutral-200);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin var(--duration-slower) linear infinite;
}

.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
.spinner-lg { width: 60px; height: 60px; border-width: 6px; }

/* ========================================
   10. TOOLTIPS
   ======================================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

/* ========================================
   11. BREADCRUMBS
   ======================================== */
.breadcrumb-modern {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: var(--text-sm);
}

.breadcrumb-item-modern {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.breadcrumb-item-modern:not(:last-child)::after {
    content: '/';
    color: var(--neutral-400);
}

.breadcrumb-link-modern {
    color: var(--neutral-600);
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb-link-modern:hover {
    color: var(--color-primary);
}

.breadcrumb-item-modern:last-child .breadcrumb-link-modern {
    color: var(--color-primary);
    font-weight: var(--font-semibold);
}

/* ========================================
   12. DIVIDERS
   ======================================== */
.divider-modern {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neutral-300), transparent);
    margin: var(--space-8) 0;
}

.divider-with-text {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-8) 0;
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--neutral-300);
}

/* ========================================
   13. ACCORDIONS
   ======================================== */
.accordion-modern {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--neutral-200);
}

.accordion-item-modern {
    border-bottom: 1px solid var(--neutral-200);
}

.accordion-item-modern:last-child {
    border-bottom: none;
}

.accordion-header-modern {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    font-weight: var(--font-semibold);
    background: white;
    border: none;
    cursor: pointer;
    transition: background var(--transition-base);
}

.accordion-header-modern:hover {
    background: var(--neutral-50);
}

.accordion-icon-modern {
    transition: transform var(--transition-base);
}

.accordion-item-modern.active .accordion-icon-modern {
    transform: rotate(180deg);
}

.accordion-body-modern {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
}

.accordion-item-modern.active .accordion-body-modern {
    max-height: 500px;
    padding: var(--space-4) var(--space-5);
}

/* ========================================
   14. TABS
   ======================================== */
.tabs-modern {
    border-bottom: 2px solid var(--neutral-200);
}

.tabs-list-modern {
    display: flex;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-modern {
    padding: var(--space-3) var(--space-6);
    font-weight: var(--font-medium);
    color: var(--neutral-600);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.tab-modern:hover {
    color: var(--color-primary);
    background: var(--primary-50);
}

.tab-modern.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: var(--font-semibold);
}

.tab-content-modern {
    padding: var(--space-6) 0;
}

.tab-panel-modern {
    display: none;
    animation: fadeIn var(--duration-base) var(--ease-out);
}

.tab-panel-modern.active {
    display: block;
}

/* ========================================
   15. DROPDOWN MENUS
   ======================================== */
.dropdown-modern {
    position: relative;
    display: inline-block;
}

.dropdown-menu-modern {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    min-width: 200px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
}

.dropdown-modern.active .dropdown-menu-modern {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item-modern {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    text-align: left;
    color: var(--neutral-700);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.dropdown-item-modern:hover {
    background: var(--primary-50);
    color: var(--color-primary);
}

.dropdown-divider-modern {
    height: 1px;
    background: var(--neutral-200);
    margin: var(--space-2) 0;
}

/* ========================================
   16. SKELETON LOADERS
   ======================================== */
.skeleton-modern {
    background: linear-gradient(90deg, var(--neutral-200) 25%, var(--neutral-100) 50%, var(--neutral-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-base);
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-2);
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-lg);
}

/* ========================================
   17. EMPTY STATES
   ======================================== */
.empty-state-modern {
    text-align: center;
    padding: var(--space-16) var(--space-8);
}

.empty-state-icon-modern {
    font-size: 4rem;
    color: var(--neutral-400);
    margin-bottom: var(--space-4);
}

.empty-state-title-modern {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--neutral-700);
    margin-bottom: var(--space-2);
}

.empty-state-text-modern {
    color: var(--neutral-600);
    margin-bottom: var(--space-6);
}

/* ========================================
   18. ANIMATION UTILITIES
   ======================================== */
.will-animate {
    opacity: 0;
    transition: all var(--duration-slow) var(--ease-out);
}

.will-animate.is-visible {
    opacity: 1;
}

.slide-up.will-animate {
    transform: translateY(30px);
}

.slide-up.is-visible {
    transform: translateY(0);
}

.slide-left.will-animate {
    transform: translateX(30px);
}

.slide-left.is-visible {
    transform: translateX(0);
}

.slide-right.will-animate {
    transform: translateX(-30px);
}

.slide-right.is-visible {
    transform: translateX(0);
}

.zoom-in.will-animate {
    transform: scale(0.9);
}

.zoom-in.is-visible {
    transform: scale(1);
}

