/*
Theme Name: MigraSync Theme
Theme URI: https://migrasync.com
Author: Elliyas Ahmed
Description: Modern SaaS theme for MigraSync.
Version: 1.0.0
Text Domain: migrasync-theme
*/

body {
    font-family: "Hanken Grotesk", sans-serif;
    scroll-behavior: smooth;
    color: #000000;
}

h1,
h2,
h3 {
    font-family: "Albert Sans", sans-serif;
    font-weight: 500 !important;
    letter-spacing: -0.9px !important;
}

h4,
h5,
h6 {
    font-family: "Albert Sans", sans-serif;
}

p {
    line-height: 1.325 !important;
}

.bg-soft {
    background-color: #FDFBFA;
}

.text-accent {
    color: #9966cc;
}

/* Logo + MigraSync wordmark: icon slightly taller than cap height (~4:3 text:icon per brand art). */
.migrasync-site-brand {
    align-items: center;
    gap: 0.35em;
}

.migrasync-site-brand__logo {
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.migrasync-site-brand__text {
    font-family: "Albert Sans", system-ui, sans-serif;
    font-weight: 700;
    color: #000000;
    line-height: 1;
    letter-spacing: -0.04em;
}

.migrasync-site-brand--header .migrasync-site-brand__logo {
    width: 2rem;
    height: 2rem;
}

.migrasync-site-brand--header .migrasync-site-brand__text {
    font-size: 1.5rem;
}

.migrasync-site-brand--footer .migrasync-site-brand__logo {
    width: 2.25rem;
    height: 2.25rem;
}

.migrasync-site-brand--footer .migrasync-site-brand__text {
    font-size: 1.625rem;
    font-weight: 800;
}

/* Tailwind CDN has no default `accent` palette; these back `bg-accent` / `border-accent` in markup. */
.bg-accent {
    background-color: #9966cc;
}

.border-accent {
    border-color: #9966cc;
}

.btn-primary {
    background-color: #9966cc;
}

.btn-primary:hover {
    background-color: #8759b8;
}

button,
.btn-primary,
.card,
input,
select,
textarea,
[class*="rounded"] {
    border-radius: 4px !important;
}

button,
[type="button"],
[type="submit"],
[type="reset"],
.btn-primary,
a.btn-primary {
    box-shadow: none !important;
    text-shadow: none !important;
    background-image: none !important;
}

.shadow-sm,
.shadow-md,
.shadow-lg,
.shadow-xl,
.shadow-2xl,
[class*="shadow-"] {
    box-shadow: none !important;
    text-shadow: none !important;
}

button[class*="bg-black"],
button[class*="bg-\\[\\#000000\\]"],
button[class*="bg-\\[\\#0077B5\\]"],
button[class*="bg-\\[\\#0B1E19\\]"],
a[class*="bg-black"],
a[class*="bg-\\[\\#000000\\]"],
a[class*="bg-\\[\\#0077B5\\]"],
a[class*="bg-\\[\\#0B1E19\\]"] {
    background-color: #9966cc !important;
    color: #ffffff !important;
}

a.migrasync-footer-newsletter-cta {
    color: #ffffff !important;
}

a.migrasync-footer-newsletter-cta svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
}

/* 1. HAMBURGER ANIMATION SETTINGS */
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #475569;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9px;
}

.hamburger span:nth-child(2) {
    margin: 6px 0;
}

/* 2. TOGGLE LOGIC: HAMBURGER TO CROSS */
#menu-toggle.is-open .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#menu-toggle.is-open .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

#menu-toggle.is-open .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 3. MOBILE MENU POP OVERLAY */
#mobile-menu {
    opacity: 0;
    position: fixed;
    inset: 0;
    z-index: 70;
    padding: 0;
    background: #ffffff;
    transform: none;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
    display: block !important;
}

#mobile-menu .mobile-menu-panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    border: 0 !important;
    border-radius: 0 !important;
}

#mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-close-btn:focus-visible {
    outline: 2px solid #9966cc;
    outline-offset: 2px;
    border-radius: 4px;
}

input:focus,
input:focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible {
    outline: 2px solid #9966cc !important;
    outline-offset: 1px;
    border-color: #9966cc !important;
    box-shadow: 0 0 0 2px rgba(153, 102, 204, 0.2) !important;
}

/* 4. PREVENT BACKGROUND SCROLL */
body.mobile-menu-open {
    overflow: hidden;
}

/* Typography for Article Body */
.prose h1 {
    font-size: 3.5rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.9px;
    color: #000000;
    margin: 3rem 0 1.5rem;
}

.prose h2 {
    font-weight: 500;
    color: #000000;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-size: 1.875rem;
    letter-spacing: -0.9px;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.35;
    color: #000000;
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.9px;
}

.prose p {
    line-height: 1.325;
    color: #000000;
    margin-bottom: 1.5rem;
}

.prose blockquote {
    border-left: 4px solid #9966cc;
    padding-left: 1.5rem;
    font-style: italic;
    color: #9966cc;
    font-size: 1.25rem;
    margin: 2rem 0;
}

.prose code {
    background: #F1F5F9;
    color: #9966cc;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
}

.prose li {
    margin-bottom: 0.5rem;
    color: #475569;
    line-height: 1.7;
}

.wp-content {
    width: 100%;
    padding: 0 5%;
}

/* Layout Fixes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tab Switching Logic */
.tab-active {
    background-color: white;
    color: #9966cc;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.hidden-section {
    display: none;
}

/*
         * Newsletter terms: same checkbox pattern as migrasync-worker migration wizard (.msw-choice).
         * Scoped so front-end never inherits wp-admin forms.css.
         */
.migrasync-newsletter-wrap .msw-choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.5;
    cursor: pointer;
}

.migrasync-newsletter-wrap .msw-choice.msw-choice--locked {
    cursor: default;
    opacity: 0.95;
}

.migrasync-newsletter-wrap .msw-choice input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background-color: #ffffff;
    accent-color: transparent;
    color: inherit;
    forced-color-adjust: none;
    color-scheme: only light;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, background 0.15s ease;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.migrasync-newsletter-wrap .msw-choice input[type="checkbox"]:hover:not(:disabled) {
    border-color: rgba(153, 102, 204, 0.55);
}

.migrasync-newsletter-wrap .msw-choice input[type="checkbox"]:checked {
    border-color: #9966cc;
    background-color: #9966cc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M6.37 12.04 2.6 8.27l1.06-1.06 2.6 2.6 6.08-6.08 1.06 1.06-7.14 7.15z'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center center;
    background-repeat: no-repeat;
}

.migrasync-newsletter-wrap .msw-choice input[type="checkbox"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.migrasync-newsletter-wrap .msw-choice input[type="checkbox"]:focus {
    outline: none;
}

.migrasync-newsletter-wrap .msw-choice input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(153, 102, 204, 0.55);
}

.migrasync-newsletter-wrap .msw-choice span {
    flex: 1;
    min-width: 0;
}

/* Custom Toggle Switch */
.toggle-dot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#billing-cycle:checked~.toggle-bg .toggle-dot {
    transform: translateX(1.25rem);
}

#billing-cycle:checked~.toggle-bg {
    background-color: #9966cc;
}

/* Desktop mega menu: translateY only (no translateX). Horizontal centering is flex on .migrasync-mega-panel-outer — Tailwind translateX must not be on .mega-menu or this transform overwrites it. */
@media (min-width: 1024px) {
    .mega-menu {
        visibility: hidden;
        opacity: 0;
        transform: translateY(15px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
        pointer-events: none;
        display: grid;
    }

    .mega-menu::before {
        content: "";
        position: absolute;
        top: -20px;
        left: 0;
        right: 0;
        height: 20px;
        background: transparent;
    }

    .group:hover .mega-menu,
    .group:focus-within .mega-menu {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* Force all icons in the footer to be white and have visible lines */
footer svg.lucide {
    stroke: #ffffff !important;
    color: #ffffff !important;
    stroke-width: 2.5px !important;
    display: inline-block !important;
}

/* Dashboard mobile drawer: prevent background scroll when open */
/* Front-page hero demo simulation (Albert Sans headings, live progress — illustrative only). */
.migrasync-hero-sim__title,
.migrasync-hero-sim__kicker {
    font-family: "Albert Sans", system-ui, sans-serif;
}

.migrasync-hero-sim__stats {
    font-family: "Hanken Grotesk", system-ui, sans-serif;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #475569;
}

.migrasync-hero-sim__stat,
.migrasync-hero-sim__line {
    font-weight: 500;
}

/* Hero demo: ensure fill is visible (grey track + brand purple fill by width %). */
#migrasync-hero-sim__bar {
    background-color: #9966cc;
    min-width: 0;
    max-width: 100%;
}

body.msw-dash-drawer-open {
    overflow: hidden;
}