/* ============================================
   SPA Navigation - Loading States
   Styles for AJAX-based navigation
   ============================================ */

/* Loading state for content area */

.licenses {
    display: none;
}
footer {
    display: none;
}
.woocommerce-MyAccount-content.is-loading {
    position: relative;
    min-height: 200px;
    pointer-events: none;
}

.ayarka-sidebar.is-loading {
    pointer-events: none;
}

.mobile-nav-bar.is-loading {
    /* position: relative; */
    /* min-height: 200px; */
    pointer-events: none;
}


.main-content {
    max-width: var(--container-width);
    padding: var(--padding-header);
    margin: auto;
}

.entry-header {
    display: none;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dashboard__return-btn__icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.back-to-dashboard {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary-blue);
  text-decoration: none;
  border: 1px solid var(--color-primary-blue);
  border-radius: var(--radius-default);
  transition: var(--transition-all);
  background-color: transparent;
  font-family: var(--font-family-body);
  margin-bottom: var(--spacing-md);
}

.back-to-dashboard:hover {
  background-color: var(--color-bg-liblue);
  color: var(--color-primary-blue);
}

.back-to-dashboard svg {
  flex-shrink: 0;
  transform: rotate(180deg);
}

/* @keyframes spa-spinner {
    to {
        transform: rotate(360deg);
    }
} */

/* Smooth transitions for content changes */
.woocommerce-MyAccount-content {
    transition: opacity 0.15s ease-out;
}

/* Active navigation item styling */
.woocommerce-MyAccount-navigation li.is-active>a,
.woocommerce-MyAccount-navigation li.is-active>a:hover {
    color: var(--color-primary, #667eea);
    font-weight: 600;
}

/* Error message styling */
.woocommerce-MyAccount-content .woocommerce-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md, 8px);
    padding: var(--spacing-lg, 24px);
    text-align: center;
}

.woocommerce-MyAccount-content .woocommerce-error p {
    color: #dc2626;
    margin-bottom: var(--spacing-md, 16px);
}

.woocommerce-MyAccount-content .woocommerce-error .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-primary, #667eea);
    color: #fff;
    border-radius: var(--radius-sm, 6px);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.woocommerce-MyAccount-content .woocommerce-error .button:hover {
    background-color: var(--color-primary-dark, #5563d3);
}

/* ============================================
   Sidebar Navigation - Nobitex Style
   Collapsed icons, expands on hover
   ============================================ */

/* Fix overflow-x to use clip (not hidden) so position:sticky works on the sidebar */
html:has(body.woocommerce-account),
body.woocommerce-account {
    overflow-x: clip;
    scrollbar-gutter: stable;
    --ayarka-account-header-height: 50px;
    padding-top: 50px;
}

/* Modal scroll lock — pin layout width in JS; no body padding (RTL-safe) */
html.ayarka-scroll-locked {
    overflow: hidden;
    scrollbar-gutter: stable;
    box-sizing: border-box;
}

body.ayarka-scroll-locked {
    overscroll-behavior: none;
    touch-action: none;
}

/* Freeze panel width before scrollbar disappears (set via --ayarka-lock-viewport-w on html) */
html.ayarka-scroll-locked body.woocommerce-account .ayarka-account-shell,
html.ayarka-scroll-locked body.woocommerce-account .header,
html.ayarka-scroll-locked body.woocommerce-account .mobile-nav-bar {
    width: var(--ayarka-lock-viewport-w, 100%);
    max-width: var(--ayarka-lock-viewport-w, 100%);
    box-sizing: border-box;
}

/* Header fixed: does not scroll with page content */
body.woocommerce-account .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1100;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e3e5;
}

body.woocommerce-account .header__nav {
    /* border-bottom: 1px solid #e0e3e5; */
    /* box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04); */
    margin-bottom: 0;
}

/* Header drawer: My Account endpoint list */
.ayarka-mobile-nav--account .ayarka-mobile-item {
    gap: 10px;
}

.ayarka-myaccount-mobile-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.ayarka-myaccount-mobile-icon--placeholder {
    display: inline-block;
    width: 22px;
    height: 22px;
}

.ayarka-myaccount-mobile-link.is-active {
    color: var(--ayarka-primary, #c9a227);
}

body.woocommerce-account .main-content {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

body.woocommerce-account .entry-content {
    max-width: none;
    padding: 0;
}

.ayarka-account-shell {
    width: 100%;
    min-height: calc(100vh - var(--ayarka-account-header-height, 50px));
}

.ayarka-endpoint-section[hidden] {
    display: none !important;
}

.ayarka-account-main {
    min-width: 0;
    width: auto;
    box-sizing: border-box;
    padding: var(--spacing-md);
}

@media (min-width: 769px) {
    .ayarka-account-main {
        margin-right: 62px;
        padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-lg) var(--spacing-4xl);
    }

    /* section-title-header-ws: mobile-only wrapper — no layout on desktop */
    .section-title-header-ws {
        display: block;
        margin: 0;
        padding: 0;
        border: none;
        gap: 0;
        flex-direction: unset;
        align-items: unset;
        justify-content: unset;
    }

    .section-title-header-ws .tabs-rules-wrapper-ws {
        margin: 0;
        margin-bottom: 0;
    }

    .ayarka-profile-endpoint .section-title-header-ws {
        display: none;
    }
}

@media (max-width: 768px) {
    .section-title-header-ws {
        display: flex;
        flex-direction: column;
    }

    .section-title-header-ws .tabs-rules-wrapper-ws {
        margin-bottom: 0;
    }

    .ayarka-profile-endpoint .section-title-header-ws {
        margin-bottom: 8px;
    }
}

.ayarka-sidebar {
    position: fixed;
    right: 0;
    top: 82px;
    left: auto;
    flex-shrink: 0;
    width: 62px;
    height: calc(100vh - var(--ayarka-account-header-height, 50px));
    background-color: #ffffff;
    border-right: none;
    border-left: 1px solid #e0e3e5;
    border-top: 1px solid #e0e3e5;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.04);
}

.ayarka-sidebar:hover {
    width: 220px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
}

/* Force collapsed after tab click (overrides :hover) */
.ayarka-sidebar.ayarka-sidebar--collapsed,
.ayarka-sidebar.ayarka-sidebar--collapsed:hover {
    width: 62px;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.04);
}

.ayarka-sidebar.ayarka-sidebar--collapsed .ayarka-sidebar__text,
.ayarka-sidebar.ayarka-sidebar--collapsed:hover .ayarka-sidebar__text {
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
}

.ayarka-sidebar__inner {
    display: flex;
    flex-direction: column;
    padding: 6px 0;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    scrollbar-width: none;
}

.ayarka-sidebar__inner::-webkit-scrollbar {
    display: none;
}

.ayarka-sidebar__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.ayarka-sidebar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 11px 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    font-family: 'iranyekan', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    transition: color 0.2s ease, font-weight 0.2s ease;
    position: relative;
    min-height: 36px;
    border-radius: 10px;
    margin: 2px 8px;
}

.ayarka-sidebar__item:hover {
    background-color: #f4f5f7;
    color: #1a1a1a;
}

/* Active: highlight pill around icon (collapsed) / icon+text (expanded) */
.ayarka-sidebar__item.is-active,
.ayarka-sidebar__input:checked + .ayarka-sidebar__item {
    color: var(--color-primary-blue, #1c2474);
    font-weight: 600;
    background-color: rgba(28, 36, 116, 0.08);
}

.ayarka-sidebar__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.ayarka-sidebar__item:hover .ayarka-sidebar__icon,
.ayarka-sidebar__item.is-active .ayarka-sidebar__icon,
.ayarka-sidebar__input:checked + .ayarka-sidebar__item .ayarka-sidebar__icon {
    opacity: 1;
    transform: scale(1.08);
}

.ayarka-sidebar__icon--placeholder {
    display: inline-block;
    background-color: #d1d5db;
    border-radius: 4px;
}

.ayarka-sidebar__text {
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.2s ease 0.05s, transform 0.2s ease 0.05s;
    pointer-events: none;
    line-height: 1.3;
}

.ayarka-sidebar__group {
    display: flex;
    flex-direction: column;
}

.ayarka-sidebar__submenus {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px 8px 42px;
}

.ayarka-sidebar__submenu-link {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    color: #5f6b76;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ayarka-sidebar__submenu-link:hover,
.ayarka-sidebar__submenu-link.is-active {
    background-color: #f3f6f8;
    color: #111827;
}

.ayarka-sidebar.ayarka-sidebar--collapsed .ayarka-sidebar__submenus {
    display: none;
}

.ayarka-subnav {
    margin-bottom: 16px;
}

.ayarka-subnav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ayarka-subnav__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #e0e3e5;
    background: #fff;
    color: #374151;
    font-size: 13px;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.ayarka-subnav__link:hover,
.ayarka-subnav__link.is-active {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #111827;
}

.ayarka-submenu-section[hidden] {
    display: none !important;
}

.ayarka-sidebar:hover .ayarka-sidebar__text {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Modals above sidebar; header stays above sidebar via .header z-index */
body.woocommerce-account .modal-overlay {
    z-index: 1150;
}

/* Mobile Navigation Bar */
.mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    align-items: center;
    justify-content: space-around;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(224, 227, 229, 0.8);
    /* padding: 8px 4px; */
    z-index: var(--z-index-modal, 1000);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08), 0 -1px 4px rgba(0, 0, 0, 0.04);
    min-height: 70px;
    max-height: 70px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.mobile-nav-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.mobile-nav-label {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--color-text-secondary, #666666);
    opacity: 0.5;
    min-height: 54px;
    z-index: 10;
    transform: scale(0.95);
    overflow: hidden;
}

.mobile-nav-label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(28, 36, 116, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-label:active::before {
    width: 100px;
    height: 100px;
    opacity: 1;
    transition: width 0.3s ease-out, height 0.3s ease-out, opacity 0.1s ease-out;
}

.mobile-nav-label:active {
    transform: scale(0.88);
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    object-fit: contain;
    filter: grayscale(0.3) brightness(0.9);
}

.mobile-nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    transition: stroke 0.3s ease;
}

.mobile-nav-text {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    font-family: 'iranyekan', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-input:checked+.mobile-nav-label {
    opacity: 1;
    color: var(--color-primary-blue, #1c2474);
    transform: scale(1.05);
}

.mobile-nav-input:checked+.mobile-nav-label .mobile-nav-icon {
    transform: translateY(-3px) scale(1.2) rotate(-5deg);
    filter: grayscale(0) brightness(1) drop-shadow(0 2px 4px rgba(28, 36, 116, 0.2));
    animation: iconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconBounce {
    0% {
        transform: translateY(-3px) scale(1.2) rotate(-5deg);
    }
    50% {
        transform: translateY(-6px) scale(1.25) rotate(0deg);
    }
    100% {
        transform: translateY(-3px) scale(1.2) rotate(-5deg);
    }
}

.mobile-nav-input:checked+.mobile-nav-label .mobile-nav-text {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.mobile-nav-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: calc(100% / 6);
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-primary-blue, #1c2474) 0%, 
        var(--color-secondary-gold, #C9A961) 100%);
    background-size: 200% 100%;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -2px 12px rgba(28, 36, 116, 0.4);
    animation: gradientSlide 3s ease infinite;
}

@keyframes gradientSlide {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.mobile-tab--1:checked~.mobile-nav-indicator {
    right: 0;
    animation: indicatorSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), gradientSlide 3s ease infinite;
}

.mobile-tab--2:checked~.mobile-nav-indicator {
    right: calc(100% / 6);
    animation: indicatorSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), gradientSlide 3s ease infinite;
}

.mobile-tab--3:checked~.mobile-nav-indicator {
    right: calc(100% / 6 * 2);
    animation: indicatorSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), gradientSlide 3s ease infinite;
}

.mobile-tab--4:checked~.mobile-nav-indicator {
    right: calc(100% / 6 * 3);
    animation: indicatorSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), gradientSlide 3s ease infinite;
}

.mobile-tab--5:checked~.mobile-nav-indicator {
    right: calc(100% / 6 * 4);
    animation: indicatorSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), gradientSlide 3s ease infinite;
}

.mobile-tab--6:checked~.mobile-nav-indicator {
    right: calc(100% / 6 * 5);
    animation: indicatorSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), gradientSlide 3s ease infinite;
}

@keyframes indicatorSlide {
    0% {
        transform: scaleX(0.8);
        opacity: 0.7;
    }
    50% {
        transform: scaleX(1.1);
        opacity: 1;
    }
    100% {
        transform: scaleX(1);
        opacity: 1;
    }
}


/* Hide mobile nav on desktop, show sidebar */
.mobile-nav-bar {
    display: none;
}

.ayarka-sidebar {
    display: flex;
}

/* Show mobile nav on mobile, hide sidebar */
@media (max-width: 768px) {
    .mobile-nav-bar {
        display: flex;
    }

    .ayarka-sidebar {
        display: none;
    }

    .ayarka-account-main {
        margin-right: 0;
        margin-bottom: 80px;
    }
}

/* ============================================
   Table Zebra Stripping - Global Style
   Applied to all tables across the application
   ============================================ */
table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

table tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

/* table tbody tr:hover {
    background-color: var(--color-bg-light) !important;
} */

/* ============================================
   Modal System - Global Styles
   Shared across all modals in the application
   ============================================ */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-index-modal);
    padding: var(--spacing-lg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.ayarka-modal-open {
    opacity: 1;
}

/* Lock size while fading out (set --ayarka-modal-lock-h in JS) */
.modal-overlay.ayarka-modal-closing .modal-content {
    height: var(--ayarka-modal-lock-h) !important;
    min-height: var(--ayarka-modal-lock-h) !important;
    max-height: var(--ayarka-modal-lock-h) !important;
    flex: 0 0 auto;
}

/* Modal Content Container */
.modal-content {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow-modal);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    margin: var(--spacing-sm);
}

/* Modal Content Large - For larger modals */
.modal-content-large {
    max-width: 100%;
    max-height: 85vh;
}

/* Modal Header */
.modal-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--color-border-light);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

/* Modal Close Button */
.modal-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
    border-radius: var(--radius-default);
    flex-shrink: 0;
    min-width: 44px;
}

.modal-close-btn:hover {
    /* background-color: var(--color-bg-light); */
    color: var(--color-text-primary);
}

.modal-close-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

/* Modal Title */
.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    text-align: right;
    line-height: 1.4;
}

/* Modal Body */
.modal-body {
    padding: var(--spacing-xl);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Popup summary rows (shared across modals and address panels) */
.popup-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-primary);
    justify-content: flex-start;
    margin: var(--spacing-md) 0;
}

.row-label-text {
    font-weight: 400;
    color: var(--color-text-primary);
    font-size: 14px;
    text-align: right;
}

.row-value-text {
    color: var(--color-text-primary);
    font-size: 16px;
    text-align: left;
    font-weight: var(--font-weight-medium);
}

/* Modal Footer */
.modal-footer {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

/* Modal Buttons - Base Styles */
.modal-footer .cancel-btn,
.modal-footer .submit-btn,
.modal-footer .confirm-btn,
.modal-footer .delete-btn {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-card);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
    min-height: 44px;
    /* Touch target for mobile */
    box-sizing: border-box;
    border: none;
    outline: none;
    white-space: nowrap;
    text-align: center;
}

/* Cancel Button */
.modal-footer .cancel-btn {
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
    color: var(--color-text-primary);
}

.modal-footer .cancel-btn:hover {
    background-color: var(--color-bg-lighter);
    border-color: var(--color-primary-blue);
    color: var(--color-primary-blue);
}

.modal-footer .cancel-btn:active {
    background-color: var(--color-bg-lighter);
}

.modal-footer .cancel-btn:focus-visible {
    outline: 2px solid var(--color-primary-blue);
    outline-offset: 2px;
}

/* Submit/Confirm Button */
.modal-footer .submit-btn,
.modal-footer .confirm-btn {
    background-color: var(--color-primary-blue);
    color: var(--color-text-white);
    font-weight: 600;
}

.modal-footer .submit-btn:hover,
.modal-footer .confirm-btn:hover {
    background-color: var(--color-primary-blue-hover);
}

.modal-footer .submit-btn:active,
.modal-footer .confirm-btn:active {
    background-color: var(--color-primary-blue-active);
}

.modal-footer .submit-btn:focus-visible,
.modal-footer .confirm-btn:focus-visible {
    outline: 2px solid var(--color-primary-blue);
    outline-offset: 2px;
}

/* Delete Button */
.modal-footer .delete-btn {
    background-color: var(--color-status-error);
    color: var(--color-text-white);
    font-weight: 600;
}

.modal-footer .delete-btn:hover {
    background-color: #b71c1c;
}

.modal-footer .delete-btn:active {
    background-color: #c62828;
}

.modal-footer .delete-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

/* Confirm Text - For confirmation modals */
.confirm-text {
    font-size: 14px;
    color: var(--color-text-primary);
    text-align: right;
    margin: 0;
    line-height: 1.6;
}

.confirm-text p {
    margin: 0 0 var(--spacing-md) 0;
}

.confirm-text p:last-child {
    margin-bottom: 0;
}

/* Confirm Details Box - For transaction confirmation modals */
.confirm-details {
    background-color: var(--color-bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
}

.confirm-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.confirm-details-row:last-child {
    margin-bottom: 0;
}

.confirm-details-label {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.confirm-details-value {
    font-weight: 500;
    font-size: 14px;
    color: var(--color-text-primary);
}

.confirm-details-value--amount {
    font-weight: 600;
    /* direction: ltr; */
    text-align: left;
}

/* Rules Text - For rules modals */
.rules-text {
    font-size: 14px;
    text-align: justify;
    color: var(--color-text-primary);
    line-height: 1.6;
    margin: 0;
}

.rules-text p {
    margin: 0 0 var(--spacing-md) 0;
}

.rules-text p:last-child {
    margin-bottom: 0;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: var(--font-size-bar-title);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    line-height: 1.3;
}

/*============================================CALCULATOR SECTION============================================*/
.calculator__right {
    padding: 0px var(--padding-horizental) var(--padding-section)var(--padding-horizental);
    background-color: var(--color-bg-card);
    position: relative;
    overflow: hidden;
}

.calculator__container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-4xl);
    align-items: stretch;
}

.calculator__left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.calculator__right {
    display: none;
    width: 100%;
    /* min-width: 320px; */
    text-align: right;
    background-color: var(--color-bg-light);
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-bg-lighter);
}

.calculator__title-wrapper {
    position: relative;
    margin-bottom: var(--spacing-md);
    width: 100%;
    min-height: 150px;
    overflow: visible;
    margin-bottom: -85px;
}

.calculator__title-bg {
    position: absolute;
    top: -15px;
    right: -20px;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: top right;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.calculator__title {
    font-size: var(--font-size-h2);
    position: relative;
    padding-top: 10px;
    z-index: 99;
    margin: 0;
    /* font-family: var(--font-family-heading); */
}

.tab-containers {
    display: flex;
    justify-content: space-between;
}

.calculator__subtitle {
    font-size: var(--font-size-box-caption);
    background: linear-gradient(90deg, var(--color-secondary-gold), var(--color-secondary-gold));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: var(--font-weight-medium);
    z-index: 99;
    position: relative;
}

/* Tab Container Styles */
.calculator__right .tab-container__right {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 4px 6px;
    background-color: var(--color-bg-lighter);
    border-radius: var(--radius-default);
    margin-bottom: 16px;
    width: 100%;
}

.price-info {
    justify-content: right;
}

.calculator__right .tab {
    width: 50%;
    height: 36px;
    position: absolute;
    z-index: 99;
    outline: none;
    opacity: 0;
    cursor: pointer;
}

.calculator__right .tab--1 {
    right: 0;
}

.calculator__right .tab--2 {
    right: 50%;
}

.calculator__right .tab_label {
    width: 50%;
    height: 36px;
    position: relative;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    opacity: 0.6;
    cursor: pointer;
    color: var(--color-text-primary);
    transition: var(--transition-fast);
    font-size: 1.15rem;
    font-weight: var(--font-weight-medium);
}

.calculator__right .tab:checked+.tab_label {
    opacity: 1;
    font-weight: 600;
    color: var(--color-text-primary);
}

.calculator__right .indicator {
    position: absolute;
    width: calc(50% - 4px);
    height: 36px;
    background-color: var(--color-bg-card);
    border-radius: calc(var(--radius-default) - 2px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    right: 4px;
    top: 4px;
}

.calculator__right .tab--2:checked~.indicator {
    right: calc(50% + 0px);
}

/* Input Styles based on input-styles.json */
.calculator__right .input-group {
    margin-bottom: 8px;
    text-align: right;
    width: 100%;
}


.calculator__right .amount-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.calculator__right .amount-input {
    width: 100%;
    padding: 14px 18px;
    padding-left: 70px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    font-size: var(--font-size-input);
    font-weight: var(--font-weight-medium);
    font-family: 'iranyekan', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    direction: ltr;
    text-align: left;
    background-color: var(--color-bg-card);
    color: var(--color-text-primary);
    transition: var(--transition-fast);
}

.calculator__right .amount-input:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: var(--shadow-input-focus);
}

.calculator__right .amount-input::placeholder {
    color: var(--color-text-muted);
    text-align: right;
    direction: rtl;
    opacity: 1;
    font-family: 'iranyekan', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.calculator__right .amount-currency {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--font-size-input);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    pointer-events: none;
}

.calculator__right .error-message {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-status-error);
    min-height: 18px;
}

.calculator__right .error-message:empty {
    display: none;
}

.calculator__form {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 16px;
}

/* UNUSED SECTION END - purchase-steps */

.calculator__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
}

.calculator__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calculator__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px 18px;
    font-size: var(--font-size-input);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-blue) 0%, var(--color-primary-blue-hover) 100%);
    color: var(--color-text-white);
    border: none;
    border-radius: var(--radius-default);
    height: 49px;
    box-sizing: border-box;
    width: 100%;

}


.calculator__submit:hover::before {
    left: 100%;
}

.calculator__submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);

    transition: left 1s ease;

}

.calculator-ts__right-dashboard .tab-container-ts {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 4px 6px;
    background-color: var(--color-bg-lighter);
    border-radius: var(--radius-default);
    margin-bottom: var(--spacing-xl);
    width: 100%;
}

.calculator-ts__right-dashboard .tab-ts--1 {
    right: 0;
}

.calculator-ts__right-dashboard .tab-ts--1 {
    right: 0;
}

.calculator-ts__right-dashboard .tab-ts--2 {
    right: 50%;
}

.calculator-ts__right-dashboard .tab_label-ts {
    width: 50%;
    height: 36px;
    position: relative;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    opacity: 0.6;
    cursor: pointer;
    color: var(--color-text-primary);
    transition: var(--transition-fast);
    font-size: 1.15rem;
    font-weight: var(--font-weight-medium);
}

.calculator-ts__right-dashboard .tab-ts:checked+.tab_label-ts {
    opacity: 1;
    font-weight: 600;
    color: var(--color-text-primary);
}

.calculator-ts__right-dashboard .tab-ts--2:checked~.indicator-ts {
    right: calc(50% + 8px);
}

.calculator-ts__right-dashboard .tab-ts {
    width: 50%;
    height: 36px;
    position: absolute;
    z-index: 99;
    outline: none;
    opacity: 0;
    cursor: pointer;
}

.calculator-ts__right-dashboard .tab-ts:checked+.tab_label-ts {
    opacity: 1;
    font-weight: 600;
    color: var(--color-text-primary);
}

.calculator-ts__right-dashboard .indicator-ts {
    position: absolute;
    width: calc(50% - 12px);
    height: 36px;
    background-color: var(--color-bg-card);
    border-radius: calc(var(--radius-default) - 2px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    right: 4px;
    top: 4px;
}

.amount-input-wrapper {
    position: relative;
}

.calculator-ts__right-dashboard .amount-input {
    width: 100%;
    padding: 12px var(--spacing-md);
    padding-left: 60px !important;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-card);
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    font-family: 'iranyekan', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    direction: ltr;
    text-align: left;
    background-color: var(--color-bg-card);
    color: var(--color-text-primary);
    transition: var(--transition-fast);
    min-height: 44px;
    box-sizing: border-box;
}

.calculator-ts__right-dashboard .amount-input:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: var(--shadow-input-focus);
}

.calculator-ts__right-dashboard .amount-input::placeholder {
    color: var(--color-text-muted);
    text-align: right;
    direction: rtl;
    opacity: 1;
    font-family: 'iranyekan', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.input-group {
    position: relative;
}

.modal-footer .cancel-btn,
.modal-footer .submit-btn,
.modal-footer .confirm-btn,
.modal-footer .delete-btn {
    flex-direction: row;
    display: flex;
    justify-content: center;
}

.thing-canceled {
    color: #d63638;
    background: #fcf0f1;
    border: 1px solid rgba(214,54,56,.4);
}

.thing-processing{
    background: #fcf9e8;
    color: #c90;
    border: 1px solid #f0c33c;
}

.thing-completed {
    background: #f0f6fc;
    color: #2271b1;
    border: 1px solid #72aee6;
}
/* ============================================
   Modal Responsive Styles
   ============================================ */

/* Tablet (579px+) */
@media (min-width: 579px) {
    .status-badge {
        padding: 4px 10px;
    }

    .modal-content {
        max-width: 450px;
        margin: var(--spacing-xl);
    }

    .modal-title {
        font-size: 19px;
    }


    .confirm-text {
        font-size: 15px;
    }

    /* Modal footer responsive styles - Buttons can be auto width on larger screens */
    .modal-footer .cancel-btn,
    .modal-footer .submit-btn,
    .modal-footer .confirm-btn,
    .modal-footer .delete-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 120px;
    }

    /* Input Styles based on input-styles.json */
    .calculator-ts__right-dashboard .input-group {
        /* margin-bottom: -6px; */
        width: 49.4%;
    }

    .form-actions {
        width: 100%;
    }

    .calculator__form {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 16px;
        margin-top: -6px;
    }

    .calculator__right .input-group {
        width: 49.4%;
    }

    .price-info {
        justify-content: center;
    }

    .calculator__title-wrapper {
        min-height: 160px;
    }

    .calculator__right {
        padding: 32px;
    }


    .calculator__title {
        font-size: 1.75rem;
    }

    .calculator__form-group {
        flex-direction: row;
        align-items: center;
    }

    .calculator__input-unit {
        margin-right: var(--spacing-sm);
        margin-top: 0;
    }

    .calculator__submit-wrapper {
        width: 100%;
        display: flex;
        flex-direction: row-reverse;
    }

    div.features__grid:nth-child(3)>article:nth-child(2)>img:nth-child(1) {
        height: 80px;
        margin: 0px 14px;
    }

    .calculator__right .tab-container__right {
        margin-bottom: var(--spacing-2xl);
        width: 40%;
    }

    .calculator-ts__right-dashboard .amount-input {
        padding: 13px var(--spacing-lg);
        padding-left: 65px !important;
        font-size: 15px;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .status-badge {
        padding: 4px 12px;
    }

    .modal-content {
        max-width: 500px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-header {
        padding: var(--spacing-xl) var(--spacing-2xl);
    }

    .confirm-text {
        font-size: 16px;
    }

    .rules-text {
        font-size: 15px;
    }

    .modal-footer {
        padding: var(--spacing-xl) var(--spacing-2xl);
    }

    .confirm-details {
        padding: var(--spacing-xl);
    }

    .confirm-details-label,
    .confirm-details-value {
        font-size: 15px;
    }

    .calculator-ts__right-dashboard .amount-input {
        padding: 14px 18px;
        padding-left: 70px !important;
        font-size: 16px;
    }
}


/* Mobile adjustments */
@media (max-width: 578px) {
    .modal-overlay {
        padding: var(--spacing-md);
    }

    .modal-content {
        max-height: 95dvh;
        margin: 0;
    }

    .modal-header {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .modal-footer {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .tab-containers {
        flex-direction: column;
    }
    .dashboard-main-container .chart-container {
        display: none !important;
    }

}

/* ============================================
   Account transaction table — shared column widths (mobile-first)
   Reusable across all my-account transaction tables
   ============================================ */

.recent-tx-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.recent-tx-table thead {
    background-color: #ffffff;
}

.recent-tx-table th {
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: var(--color-text-primary);
    border-bottom: 2px solid var(--color-border-light);
    white-space: nowrap;
    vertical-align: middle;
}

.recent-tx-table td {
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: center;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-lighter);
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    height: 50px;
}

.recent-tx-table tbody tr:last-child td {
    border-bottom: none;
}

.recent-tx-table tbody tr:hover {
    background-color: var(--color-bg-light);
}

.recent-tx-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ayarka-tx-unit {
    font-size: calc(1em - 2px);
}

/* ── ستون‌های مشترک جداول اندپوینت (mobile-first) ───────────────────────── */
.ayarka-account-main .recent-tx-table-wrap,
.ayarka-account-main .table-wrapper {
    padding-inline-end: var(--spacing-md);
    scroll-padding-inline-end: var(--spacing-md);
}

.ayarka-tx-date-cell {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
}

.ayarka-tx-col--date {
    min-width: 130px;
    white-space: nowrap;
}

.ayarka-tx-col--status {
    min-width: 120px;
}

.ayarka-tx-col--code {
    min-width: 100px;
}

.ayarka-tx-col--actions {
    min-width: 80px;
}

.recent-tx-table .ayarka-tx-col--status .status-badge-ws,
.recent-tx-table .ayarka-tx-col--status .status-badge,
.recent-tx-table .ayarka-tx-col--status .tx-status-badge,
.delivery-requests-table .ayarka-tx-col--status .status-badge-ws,
.delivery-requests-table .ayarka-tx-col--status .status-badge,
.delivery-requests-table .ayarka-tx-col--status .tx-status-badge {
    margin: 0;
    text-align: center;
}

.recent-tx-table .ayarka-tx-col--actions .btn-cancel-trade,
.recent-tx-table .ayarka-tx-col--actions .btn-cancel-trading-tx,
.recent-tx-table .ayarka-tx-col--actions .wallet-tx-cancel-btn,
.delivery-requests-table .ayarka-tx-col--actions .btn-cancel-trade {
    margin: 0;
}

.ayarka-tx-col--type {
    min-width: 88px;
    white-space: normal;
    line-height: 1.35;
}

.ayarka-tx-col--silver {
    min-width: 72px;
}

.ayarka-tx-col--deal {
    min-width: 88px;
}

.ayarka-tx-col--price {
    min-width: 72px;
}

@media (min-width: 579px) {
    .ayarka-tx-col--type {
        min-width: 118px;
    }

    .ayarka-tx-col--silver {
        min-width: 84px;
    }

    .ayarka-tx-col--deal {
        min-width: 120px;
    }

    .ayarka-tx-col--price {
        min-width: 88px;
    }
}

@media (min-width: 1024px) {
    .ayarka-account-main .recent-tx-table-wrap,
    .ayarka-account-main .table-wrapper {
        padding-inline-end: 0;
        scroll-padding-inline-end: 0;
    }

    .ayarka-tx-col--date {
        min-width: 140px;
    }

    .ayarka-tx-col--code {
        min-width: 90px;
    }

    .ayarka-tx-col--actions {
        min-width: 120px;
    }

    .ayarka-tx-col--type {
        min-width: 140px;
    }

    .ayarka-tx-col--silver {
        min-width: 92px;
    }

    .ayarka-tx-col--deal {
        min-width: 160px;
    }

    .ayarka-tx-col--price {
        min-width: 95px;
    }
}

/* ============================================
   Page Container - Global Style
   ============================================ */

/* Tablet and above (579px+) */
@media (min-width: 579px) {
    .page-container {
        padding: var(--spacing-lg);
    }

    .calculator-ts__right-dashboard {
        width: 100% !important;
    }
    .calculator-ts__right-dashboard .tab-container-ts {
        margin-bottom: var(--spacing-2xl);
    }
    .d-none-desktop {
        display: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .calculator__container {
        flex-direction: column;
    }
}