/* ═══════════════════════════════════════════
   ZIGMA LOGIN PAGE — CSS
═══════════════════════════════════════════ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --red:        #e63946;
    --red-dark:   #c1121f;
    --red-glow:   rgba(230, 57, 70, 0.4);
    --black:      #000000;
    --dark:       #0a0a0a;
    --dark-2:     #111111;
    --dark-3:     #1a1a1a;
    --white:      #ffffff;
    --white-60:   rgba(255,255,255,0.6);
    --white-20:   rgba(255,255,255,0.2);
    --white-10:   rgba(255,255,255,0.1);
    --white-05:   rgba(255,255,255,0.05);
    --radius-lg:  24px;
    --radius-md:  16px;
    --radius-sm:  12px;
    --font:       'IRANSans';
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


@font-face {
    font-family: IRANSans;
    font-weight: normal;
    src: url('https://myzigma.com/wp-content/themes/pagebolt-child/zigma-login/fonts/IRANSansXFaNum-Regular.woff') format('woff');
    src: url('https://myzigma.com/wp-content/themes/pagebolt-child/zigma-login/fonts/IRANSansXFaNum-Regular.woff2') format('woff2');
}

@font-face {
    font-family: IRANSans;
    font-weight: bold;
    src: url('https://myzigma.com/wp-content/themes/pagebolt-child/zigma-login/fonts/IRANSansXFaNum-Bold.woff') format('woff');
    src: url('https://myzigma.com/wp-content/themes/pagebolt-child/zigma-login/fonts/IRANSansXFaNum-Bold.woff2') format('woff2');
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* غیرفعال کردن زوم */
    -ms-touch-action: pan-x pan-y;
    background: var(--black);
font-family: 'IRANSans' !important;
direction: rtl;
    -webkit-font-smoothing: antialiased;
    /* جلوگیری از select متن */
    -webkit-user-select: none;
}

.login-page {
  touch-action: pan-x pan-y;
  user-select: none;
}

.form-container input {
  touch-action: auto !important;
  user-select: text !important;
}


/* ─── Canvas پس‌زمینه ─────────────────────── */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ─── صفحه اصلی ───────────────────────────── */
.login-page {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    padding-top: max(env(safe-area-inset-top), 20px);
    padding-bottom: max(env(safe-area-inset-bottom), 30px);
    padding-left: 24px;
    padding-right: 24px;
}

/* ─── بخش بالا: لوگو ──────────────────────── */
.top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.logo-wrapper {
    position: relative;

    cursor: pointer;
    user-select: none;
}

.logo-ring {
    position: absolute;
    inset: 0px;
    border-radius: 20px;
    background: conic-gradient(
        var(--red) 0%,
        var(--red-dark) 30%,
        transparent 60%,
        transparent 100%
    );
    animation: ring-spin 3s linear infinite;
    opacity: 0.8;
}

.logo-ring::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 20px;
    background: var(--black);
}

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

.logo-img {
    position: relative;
    z-index: 1;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    object-fit: cover;
    border: 2px solid var(--white-20);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.logo-img:active {
    transform: scale(0.94);
}


/* ─── نام اپ: بولد ────────────────────────── */
.app-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
}

/* ─── بخش میانی ───────────────────────────── */
.middle-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
    max-width: 400px;
}

/* ─── تایپ‌رایتر ──────────────────────────── */
.tagline-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 70px;
}

.tagline-main {
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.5;
    min-height: 36px;
}

.tagline-main .cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--red);
    margin-right: 2px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.tagline-sub {
    font-size: 13px;
    color: var(--white-60);
    font-weight: 400;
}

/* ─── خدمات اپ ────────────────────────────── */
.features-section {
    width: 100%;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    background: var(--white-05);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-sm);
    padding: 12px 6px;
    transition: all var(--transition);
}

.feature-item:active {
    background: rgba(230, 57, 70, 0.1);
    border-color: var(--red);
    transform: scale(0.96);
}

.feature-icon {
    font-size: 22px;
    line-height: 1;
}

.feature-label {
    font-size: 10px;
    color: var(--white-60);
    text-align: center;
    line-height: 1.4;
}

/* ─── بخش پایین ───────────────────────────── */
.bottom-section {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 4px;
}


/* ─── دکمه CTA ────────────────────────────── */
.cta-wrapper {
    width: 100%;
}

.cta-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border: none;
    border-radius: var(--radius-lg);
    color: var(--white);
    font-size: 17px;
    font-weight: 700;
font-family: 'IRANSans' !important;
cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 24px var(--red-glow),
        0 1px 0 rgba(255,255,255,0.15) inset;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: btn-shine 3s ease infinite;
}

@keyframes btn-shine {
    0%   { left: -100%; }
    50%  { left: 150%;  }
    100% { left: 150%;  }
}

.cta-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 12px var(--red-glow);
}

.cta-btn .btn-icon {
    font-size: 20px;
    animation: bounce-x 1.5s ease infinite;
}

@keyframes bounce-x {
    0%, 100% { transform: translateX(0);    }
    50%       { transform: translateX(-4px); }
}

/* ─── Overlay فرم لاگین ───────────────────── */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;

    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);

    transition:
        opacity var(--transition),
        background var(--transition),
        backdrop-filter var(--transition),
        -webkit-backdrop-filter var(--transition),
        visibility 0s linear 0.3s;
}

.login-overlay.open {
    pointer-events: all;
    visibility: visible;
    opacity: 1;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    transition:
        opacity var(--transition),
        background var(--transition),
        backdrop-filter var(--transition),
        -webkit-backdrop-filter var(--transition),
        visibility 0s linear 0s;
}

.login-sheet {
    position: relative;
    width: 100%;
    background: var(--dark-2);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 0 24px;
    padding-bottom: max(env(safe-area-inset-bottom), 24px);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--white-10);
    /* اجازه اسکرول داخل sheet */
    touch-action: pan-y;
}

.login-overlay.open .login-sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--white-20);
    border-radius: 2px;
    margin: 12px auto 20px;
    cursor: grab;
}

.sheet-handle:active { cursor: grabbing; }

.sheet-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    margin-bottom: 6px;
}

.sheet-subtitle {
    font-size: 13px;
    color: var(--white-60);
    text-align: center;
    margin-bottom: 24px;
}

/* ─── فرم لاگین ───────────────────────────── */
.form-container {
    width: 100%;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container input[type="tel"],
.form-container select,
.form-container textarea {
    width: 100% !important;
    background: var(--dark-3) !important;
    color: var(--white) !important;
font-family: 'IRANSans' !important;
font-size: 16px !important;
    padding: 15px 15px !important;

    /* اجازه اسکرول و تایپ در فرم */
    touch-action: auto !important;
    -webkit-user-select: text !important;
    user-select: text !important;
}

.form-container input::placeholder {
    color: var(--white-60) !important;
}

.form-container label {
    color: var(--white-60) !important;
    font-size: 13px !important;
font-family: 'IRANSans' !important;
display: block !important;
    margin-bottom: 6px !important;
}

.form-container button[type="submit"],
.form-container input[type="submit"],
.form-container .woocommerce-button,
.form-container .button {
    width: 100% !important;
    padding: 16px !important;
    background: linear-gradient(135deg, var(--red), var(--red-dark)) !important;
    border: none !important;
    border-radius: var(--radius-sm) !important;
    color: var(--white) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
font-family: 'IRANSans' !important;
cursor: pointer !important;
    margin-top: 8px !important;
    transition: transform var(--transition), box-shadow var(--transition) !important;
    box-shadow: 0 4px 20px var(--red-glow) !important;
}

.form-container button[type="submit"]:active,
.form-container input[type="submit"]:active {
    transform: scale(0.98) !important;
}

.form-container a {
    color: var(--red) !important;
    text-decoration: none !important;
    font-size: 13px !important;
}

.form-container a:hover {
    text-decoration: underline !important;
}


/* ─── انیمیشن ورود صفحه ───────────────────── */
.login-page > * {
    animation: page-enter 0.6s ease forwards;
    opacity: 0;
}

.login-page > *:nth-child(1) { animation-delay: 0.1s; }
.login-page > *:nth-child(2) { animation-delay: 0.2s; }
.login-page > *:nth-child(3) { animation-delay: 0.3s; }

@keyframes page-enter {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ─── Responsive ──────────────────────────── */
@media (max-height: 700px) {
    .logo-wrapper  { width: 70px; height: 70px; }
    .logo-img      { width: 70px; height: 70px; }
    .tagline-main  { font-size: 16px; }
    .top-section   { margin-top: 8px; gap: 4px; }
    .features-grid { gap: 8px; }
    .feature-item  { padding: 10px 4px; }
    .feature-icon  { font-size: 18px; }
    .feature-label { font-size: 9px; }
}

@media (min-width: 768px) {
    .login-page {
        align-items: center;
        justify-content: center;
        gap: 40px;
    }
    .login-sheet {
        max-width: 480px;
        margin: 0 auto;
        border-radius: var(--radius-lg);
    }
    .login-overlay {
        align-items: center;
        justify-content: center;
    }
}
