/* ============================================
   BuildYourCV - Global Styles
   Mobile-first design system
   ============================================ */

/* ===== BASE ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BUTTONS ===== */
.btn-primary-gradient {
    background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #0891b2, #1d4ed8);
}

.btn-cta-gradient {
    background: linear-gradient(135deg, #f97316, #ec4899);
}

.btn-cta-gradient:hover {
    background: linear-gradient(135deg, #ea580c, #db2777);
}

/* ===== SCROLLBAR UTILITIES ===== */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== PATTERNS ===== */
.pattern-isometric {
    background-image:
        linear-gradient(30deg, #d1d5db 12%, transparent 12.5%, transparent 87%, #d1d5db 87.5%, #d1d5db),
        linear-gradient(150deg, #d1d5db 12%, transparent 12.5%, transparent 87%, #d1d5db 87.5%, #d1d5db),
        linear-gradient(30deg, #d1d5db 12%, transparent 12.5%, transparent 87%, #d1d5db 87.5%, #d1d5db),
        linear-gradient(150deg, #d1d5db 12%, transparent 12.5%, transparent 87%, #d1d5db 87.5%, #d1d5db),
        linear-gradient(60deg, #e5e7eb 25%, transparent 25.5%, transparent 75%, #e5e7eb 75%, #e5e7eb),
        linear-gradient(60deg, #e5e7eb 25%, transparent 25.5%, transparent 75%, #e5e7eb 75%, #e5e7eb);
    background-size: 40px 70px;
    background-position: 0 0, 0 0, 20px 35px, 20px 35px, 0 0, 20px 35px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===== FLASH MESSAGES ===== */
.flash-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.flash-error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.flash-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.flash-info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* ===== BUILDER EDITOR STYLES ===== */
.editor-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.editor-sidebar::-webkit-scrollbar {
    width: 4px;
}

.editor-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.editor-sidebar::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 9999px;
}

/* ===== MOBILE UTILITIES ===== */
/* Tap highlight removal for buttons/links */
a,
button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Prevent zoom on input focus (iOS) */
@media screen and (max-width: 767px) {

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ===== RESPONSIVE CONTAINER PADDING ===== */
.container-safe {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .container-safe {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-safe {
        padding-left: 2rem;
        padding-right: 2rem;
        max-width: 80rem;
    }
}

/* ===== SAVING INDICATOR ===== */
#savingIndicator {
    animation: fadeInUp 0.3s ease-out;
}

/* ===== DASHBOARD CARD HOVER ===== */
@media (hover: hover) {
    .cv-card:hover {
        transform: translateY(-2px);
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}