/* ===========================
   Architect Exam - Design System
   Premium Light / Modern / Clean
   =========================== */

/* Google Fonts - Inter (loaded via wp_enqueue) */

:root {
    /* Primary - Teal #1F5F62 */
    --ae-primary: #1F5F62;
    --ae-primary-light: #e6f2f3;
    --ae-primary-dark: #194d4f;
    --ae-primary-50: #e6f2f3;
    --ae-primary-100: #c0dfe1;
    --ae-primary-200: #96cbce;
    --ae-primary-300: #6cb7ba;
    --ae-primary-400: #4da3a7;
    --ae-primary-500: #2d8f93;
    --ae-primary-600: #1F5F62;
    --ae-primary-700: #1F5F62;
    --ae-primary-800: #194d4f;
    --ae-primary-900: #123a3c;

    /* Secondary - Warm accent */
    --ae-accent: #f59e0b;
    --ae-accent-light: #fef3c7;

    /* Success */
    --ae-success: #10b981;
    --ae-success-light: #ecfdf5;
    --ae-success-dark: #059669;
    --ae-success-100: #d1fae5;
    --ae-success-200: #a7f3d0;

    /* Danger */
    --ae-danger: #ef4444;
    --ae-danger-light: #fef2f2;
    --ae-danger-dark: #dc2626;
    --ae-danger-100: #fee2e2;

    /* Warning */
    --ae-warning: #f59e0b;
    --ae-warning-light: #fffbeb;
    --ae-warning-100: #fef3c7;

    /* Neutrals - Ultra clean, airy */
    --ae-bg: #f9fafb;
    --ae-bg-subtle: #f3f4f6;
    --ae-card: #ffffff;
    --ae-text: #111827;
    --ae-text-secondary: #6b7280;
    --ae-text-muted: #9ca3af;
    --ae-border: #e5e7eb;
    --ae-border-light: #f3f4f6;

    /* Radius */
    --ae-radius: 12px;
    --ae-radius-sm: 8px;
    --ae-radius-lg: 16px;
    --ae-radius-xl: 20px;
    --ae-radius-full: 9999px;

    /* Shadows - Soft, elevated */
    --ae-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --ae-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --ae-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --ae-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --ae-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --ae-shadow-glow: 0 0 0 3px rgba(31, 95, 98, 0.15);
    --ae-shadow-glow-success: 0 0 0 3px rgba(16, 185, 129, 0.12);

    /* Typography */
    --ae-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;

    /* Spacing */
    --ae-space-xs: 0.25rem;
    --ae-space-sm: 0.5rem;
    --ae-space-md: 1rem;
    --ae-space-lg: 1.5rem;
    --ae-space-xl: 2rem;
    --ae-space-2xl: 3rem;
    --ae-space-3xl: 4rem;

    /* Transitions */
    --ae-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --ae-transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset for plugin scope */
[class^="architect-"],
[class*=" architect-"] {
    box-sizing: border-box;
    font-family: var(--ae-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[class^="architect-"] *,
[class^="architect-"] *::before,
[class^="architect-"] *::after,
[class*=" architect-"] *,
[class*=" architect-"] *::before,
[class*=" architect-"] *::after {
    box-sizing: border-box;
}

/* ===========================
   Buttons
   =========================== */
.architect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    border-radius: var(--ae-radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--ae-transition);
    font-family: var(--ae-font);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.architect-btn:focus-visible {
    outline: none;
    box-shadow: var(--ae-shadow-glow);
}

.architect-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

.architect-btn--primary {
    background: var(--ae-primary);
    color: #fff;
    border-color: var(--ae-primary);
    box-shadow: 0 1px 2px rgba(31, 95, 98, 0.2);
}

.architect-btn--primary:hover:not(:disabled) {
    background: var(--ae-primary-dark);
    border-color: var(--ae-primary-dark);
    box-shadow: 0 4px 12px rgba(31, 95, 98, 0.25);
    transform: translateY(-1px);
}

.architect-btn--primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(31, 95, 98, 0.2);
}

.architect-btn--outline {
    background: var(--ae-card);
    color: var(--ae-text);
    border-color: var(--ae-border);
}

.architect-btn--outline:hover:not(:disabled) {
    background: var(--ae-bg);
    border-color: var(--ae-primary-300);
    color: var(--ae-primary);
}

.architect-btn--ghost {
    background: transparent;
    color: var(--ae-primary);
    border-color: transparent;
}

.architect-btn--ghost:hover:not(:disabled) {
    background: var(--ae-primary-50);
}

.architect-btn--danger {
    background: var(--ae-danger);
    color: #fff;
    border-color: var(--ae-danger);
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
}

.architect-btn--danger:hover:not(:disabled) {
    background: var(--ae-danger-dark);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

.architect-btn--success {
    background: var(--ae-success);
    color: #fff;
    border-color: var(--ae-success);
}

.architect-btn--success:hover:not(:disabled) {
    background: var(--ae-success-dark);
}

.architect-btn--sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 6px;
}

.architect-btn--lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: var(--ae-radius);
}

/* ===========================
   Loading States
   =========================== */
.architect-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--ae-space-3xl);
    color: var(--ae-text-secondary);
    font-size: 15px;
    gap: var(--ae-space-md);
}

.architect-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--ae-border);
    border-top-color: var(--ae-primary);
    border-radius: 50%;
    animation: ae-spin 0.7s linear infinite;
}

@keyframes ae-spin {
    to { transform: rotate(360deg); }
}

.architect-skeleton {
    background: linear-gradient(90deg, var(--ae-border-light) 25%, var(--ae-bg) 50%, var(--ae-border-light) 75%);
    background-size: 200% 100%;
    animation: ae-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--ae-radius-sm);
}

@keyframes ae-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.architect-error {
    text-align: center;
    padding: var(--ae-space-xl);
    color: var(--ae-danger-dark);
    background: var(--ae-danger-light);
    border: 1px solid var(--ae-danger-100);
    border-radius: var(--ae-radius);
    font-size: 14px;
}

/* ===========================
   Toast Notifications
   =========================== */
.architect-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.architect-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--ae-card);
    border: 1px solid var(--ae-border);
    border-radius: var(--ae-radius);
    box-shadow: var(--ae-shadow-xl);
    font-size: 14px;
    font-weight: 500;
    color: var(--ae-text);
    pointer-events: auto;
    transform: translateX(120%);
    animation: ae-toast-in 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    max-width: 380px;
    font-family: var(--ae-font);
}

.architect-toast.ae-toast-out {
    animation: ae-toast-out 0.25s ease-in forwards;
}

@keyframes ae-toast-in {
    to { transform: translateX(0); }
}

@keyframes ae-toast-out {
    to { transform: translateX(120%); opacity: 0; }
}

.architect-toast__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.architect-toast--success { border-left: 3px solid var(--ae-success); }
.architect-toast--success .architect-toast__icon { color: var(--ae-success); }

.architect-toast--error { border-left: 3px solid var(--ae-danger); }
.architect-toast--error .architect-toast__icon { color: var(--ae-danger); }

.architect-toast--warning { border-left: 3px solid var(--ae-warning); }
.architect-toast--warning .architect-toast__icon { color: var(--ae-warning); }

.architect-toast--info { border-left: 3px solid var(--ae-primary); }
.architect-toast--info .architect-toast__icon { color: var(--ae-primary); }

.architect-toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--ae-text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    line-height: 1;
    border-radius: 4px;
    transition: color var(--ae-transition);
}

.architect-toast__close:hover { color: var(--ae-text); }

/* ===========================
   Score badges
   =========================== */
.architect-score {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: var(--ae-radius-full);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.architect-score--high {
    background: var(--ae-success-light);
    color: var(--ae-success-dark);
}

.architect-score--mid {
    background: var(--ae-warning-light);
    color: #b45309;
}

.architect-score--low {
    background: var(--ae-danger-light);
    color: var(--ae-danger-dark);
}

/* ===========================
   Badges / Tags
   =========================== */
.architect-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--ae-radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.architect-badge--success {
    background: var(--ae-success-100);
    color: var(--ae-success-dark);
}

.architect-badge--danger {
    background: var(--ae-danger-100);
    color: var(--ae-danger-dark);
}

/* ===========================
   Progress Bar
   =========================== */
.architect-progress {
    height: 6px;
    background: var(--ae-border-light);
    border-radius: var(--ae-radius-full);
    overflow: hidden;
}

.architect-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ae-primary-400), var(--ae-primary));
    border-radius: var(--ae-radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Modal Overlay
   =========================== */
.architect-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ae-space-md);
    opacity: 0;
    animation: ae-fade-in 0.2s ease forwards;
}

@keyframes ae-fade-in {
    to { opacity: 1; }
}

.architect-modal {
    background: var(--ae-card);
    border-radius: var(--ae-radius-lg);
    box-shadow: var(--ae-shadow-xl);
    padding: var(--ae-space-xl);
    max-width: 420px;
    width: 100%;
    transform: scale(0.95);
    animation: ae-modal-in 0.25s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

@keyframes ae-modal-in {
    to { transform: scale(1); }
}

.architect-modal__title {
    margin: 0 0 var(--ae-space-sm);
    font-size: 18px;
    font-weight: 700;
    color: var(--ae-text);
}

.architect-modal__body {
    font-size: 14px;
    color: var(--ae-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--ae-space-lg);
}

.architect-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--ae-space-sm);
}

/* ===========================
   Access Denied
   =========================== */
.architect-access-denied {
    display: flex;
    justify-content: center;
    padding: var(--ae-space-3xl) var(--ae-space-md);
}

.architect-access-denied__card {
    background: var(--ae-card);
    border: 1px solid var(--ae-border);
    border-radius: var(--ae-radius-xl);
    padding: var(--ae-space-2xl) var(--ae-space-xl);
    max-width: 460px;
    text-align: center;
    box-shadow: var(--ae-shadow-lg);
}

.architect-access-denied__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--ae-primary-50);
    color: var(--ae-primary);
    margin-bottom: var(--ae-space-lg);
}

.architect-access-denied__card h2 {
    margin: 0 0 var(--ae-space-sm);
    color: var(--ae-text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.architect-access-denied__card p {
    color: var(--ae-text-secondary);
    margin-bottom: var(--ae-space-lg);
    font-size: 15px;
    line-height: 1.6;
}

.architect-access-denied__features {
    text-align: left;
    margin-bottom: var(--ae-space-xl);
    background: var(--ae-bg);
    border-radius: var(--ae-radius);
    padding: var(--ae-space-md);
}

.architect-access-denied__feature {
    padding: 10px var(--ae-space-sm);
    font-size: 14px;
    color: var(--ae-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.architect-access-denied__feature + .architect-access-denied__feature {
    border-top: 1px solid var(--ae-border-light);
}

.architect-access-denied__feature span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ae-success-light);
    color: var(--ae-success);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.architect-access-denied__register {
    margin-top: var(--ae-space-md);
    font-size: 13px;
    color: var(--ae-text-secondary);
}

.architect-access-denied__register a {
    color: var(--ae-primary);
    font-weight: 600;
    text-decoration: none;
}

.architect-access-denied__register a:hover {
    text-decoration: underline;
}

.architect-access-denied__price {
    margin-bottom: var(--ae-space-lg);
}

.architect-access-denied__price .woocommerce-Price-amount {
    font-size: 36px;
    font-weight: 800;
    color: var(--ae-primary);
    letter-spacing: -0.03em;
}

.architect-access-denied__price-note {
    display: block;
    font-size: 13px;
    color: var(--ae-text-muted);
    margin-top: 2px;
    font-weight: 500;
}

.architect-access-denied__product-link {
    margin-top: var(--ae-space-sm) !important;
    font-size: 13px !important;
}

.architect-access-denied__product-link a {
    color: var(--ae-text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.architect-access-denied__product-link a:hover {
    color: var(--ae-primary);
}

/* ===========================
   Animations
   =========================== */
@keyframes ae-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ae-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes ae-slide-in-right {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.ae-animate-fade-up {
    animation: ae-fade-up 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) both;
}

/* Staggered children animation */
.ae-stagger > * { animation: ae-fade-up 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) both; }
.ae-stagger > *:nth-child(1) { animation-delay: 0ms; }
.ae-stagger > *:nth-child(2) { animation-delay: 60ms; }
.ae-stagger > *:nth-child(3) { animation-delay: 120ms; }
.ae-stagger > *:nth-child(4) { animation-delay: 180ms; }
.ae-stagger > *:nth-child(5) { animation-delay: 240ms; }

/* ===========================
   Responsive: Toast on mobile
   =========================== */
@media (max-width: 480px) {
    .architect-toast-container {
        top: auto;
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    .architect-toast {
        max-width: 100%;
    }
}
