/* ===================================
   Module-Specific Styles
   =================================== */

/* Module Header */
.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--gray-100);
}

.module-title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.module-title .icon {
    font-size: var(--font-size-3xl);
}

.module-title h1 {
    margin: 0;
}

.module-actions {
    display: flex;
    gap: var(--space-md);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-label {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-bottom: var(--space-sm);
}

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin: 0;
}

/* Data Table */
.data-table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--gray-200);
}

.data-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Product Card */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.product-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-100);
}

.product-info {
    padding: var(--space-lg);
}

.product-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
}

.product-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Invoice */
.invoice-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--gray-200);
}

.invoice-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.invoice-items {
    margin-bottom: var(--space-2xl);
}

.invoice-total {
    text-align: right;
    padding-top: var(--space-lg);
    border-top: 2px solid var(--gray-200);
}

.invoice-total h3 {
    font-size: var(--font-size-2xl);
    color: var(--primary);
}

/* Filter Bar */
.filter-bar {
    background: var(--bg-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-xl);
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-secondary);
}

.empty-state .icon {
    font-size: 5rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: var(--space-xl);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* Higher than setup-screen (2000) */
    animation: fadeIn var(--transition-fast);
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--transition-base);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 2px solid var(--gray-100);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 2px solid var(--gray-100);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* WhatsApp Button */
.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border: none !important;
    transition: all var(--transition-base);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:active {
    transform: translateY(0);
}

/* Phone Input Validation */
.phone-input {
    position: relative;
}

.phone-input input:valid {
    border-color: var(--success);
}

.phone-input input:invalid:not(:placeholder-shown) {
    border-color: var(--danger);
}

/* Invoice Actions */
.invoice-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.invoice-success-modal {
    text-align: center;
}

.invoice-success-modal .icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
}


@media (max-width: 768px) {
    .module-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }
}

/* Searchable Dropdown */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

.searchable-dropdown input {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    transition: all var(--transition-fast);
}

.searchable-dropdown input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    animation: fadeIn 0.1s ease-out;
}

.dropdown-list.hidden {
    display: none;
}

.dropdown-item {
    padding: var(--space-md);
    cursor: pointer;
    border-bottom: 1px solid var(--gray-50);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: var(--gray-50);
}

.item-main {
    font-weight: 500;
}

.item-meta {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.stock-badge {
    font-size: 0.75em;
    padding: 2px 6px;
    background: var(--gray-100);
    border-radius: 4px;
    margin-left: 8px;
}

.location-badge {
    font-size: 0.75em;
    color: var(--primary);
    margin-top: 2px;
}

/* Live Search Styles */
.sticky-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 10;
    /* Solid background, no glass effect */
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Adjust margins to break out of parent padding for full bleed */
    margin: 0 calc(var(--space-2xl) * -1) var(--space-xl);
    padding: var(--space-lg) var(--space-2xl);
    /* Shadow for depth when scrolling */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

/* Dark Mode for Sticky Header */
body.dark-mode .sticky-header {
    background: var(--bg-secondary);
    /* Solid dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .sticky-header {
        /* Mobile: 1rem padding */
        margin: -1rem -1rem var(--space-lg) -1rem;
        padding: var(--space-md) var(--space-lg);
    }
}

/* Ensure header content is contained/padded properly */
.module-header.sticky-header {
    width: auto;
    border-radius: 0;
}


.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.search-container {
    position: relative;
    max-width: 600px;
    /* Limit width for aesthetics */
    /* No margin: 0 auto; let it align left or user preference? 
       Actually centered searching is nice in a sticky header. */
    /* But title is left aligned. */
    /* Let's keep it full width or align with grid? */
    /* User screenshot showed it pushed right. */
    /* I previously set sticky-header to block. */
}

.search-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 1.1em;
}

.search-container input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    padding-left: 3rem;
    /* Space for icon */
    font-size: var(--font-size-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    background: var(--gray-50);
}

.search-container input:focus {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    outline: none;
}

.highlight {
    background-color: #fef08a;
    /* yellow-200 */
    color: black;
    padding: 0 2px;
    border-radius: 2px;
}

/* ===================================
   Dark Mode Overrides - Specific
   =================================== */

/* Sticky Header in Dark Mode */
body.dark-mode .sticky-header {
    background: rgba(31, 41, 55, 0.95);
    /* Dark background */
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Search Input in Dark Mode */
body.dark-mode .search-container input {
    background-color: var(--gray-100);
    /* Darker gray for input bg */
    border-color: var(--gray-200);
    color: var(--text-primary) !important;
    /* Force white text */
}

body.dark-mode .search-container input::placeholder {
    color: var(--text-secondary) !important;
}

body.dark-mode .search-container input:focus {
    background-color: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--text-primary) !important;
}

body.dark-mode .search-icon {
    color: var(--text-secondary);
}

/* Product Card Updates */
.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 500;
    color: var(--text-primary);
}

.location-row .detail-value {
    color: var(--primary);
    font-size: 0.85em;
}

.card-out-of-stock {
    opacity: 0.8;
    background: #fff1f2;
    /* red-50 */
    border: 1px solid #fecaca;
}

.text-danger {
    color: var(--danger);
    font-weight: 700;
}

.empty-search {
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

/* Quick Find Module Styles */
.quick-find-container {
    max-width: 900px;
    margin: 0 auto;
}

.quick-find-search {
    margin-bottom: var(--space-2xl);
}

.quick-find-search input {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--font-size-2xl);
    border: 3px solid var(--primary);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-base);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.quick-find-search input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    transform: scale(1.02);
}

.quick-find-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.quick-find-card {
    background: var(--bg-primary);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.quick-find-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.quick-find-card.out-of-stock {
    background: #fff1f2;
    border-color: var(--danger);
    opacity: 0.8;
}

.quick-find-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
}

.quick-find-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
}

.quick-find-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.quick-find-details .detail-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.quick-find-details .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.quick-find-details .value {
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .quick-find-search input {
        font-size: var(--font-size-xl);
        padding: var(--space-md) var(--space-lg);
    }

    .quick-find-results-grid {
        grid-template-columns: 1fr;
    }
}

/* Activity Timeline Styles */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.timeline-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.timeline-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
}

.timeline-message {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.timeline-time {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Download Dropdown Menu */
.download-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.download-dropdown-menu.show {
    display: block;
    animation: fadeIn 0.15s ease-out;
}

.download-dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid var(--gray-100);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.download-dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.download-dropdown-menu .dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

body.dark-mode .download-dropdown-menu {
    background: var(--bg-secondary);
    border-color: var(--gray-600);
}

body.dark-mode .download-dropdown-menu .dropdown-item {
    border-bottom-color: var(--gray-700);
}

body.dark-mode .download-dropdown-menu .dropdown-item:hover {
    background: var(--gray-700);
}

/* Progress Modal */
.progress-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn var(--transition-fast);
}

.progress-modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    min-width: 400px;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    animation: slideUp var(--transition-base);
}

.progress-modal-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.progress-modal-header h3 {
    margin: 0 0 var(--space-sm) 0;
    font-size: var(--font-size-xl);
    color: var(--text-primary);
}

.progress-modal-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-full);
    transition: width 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    text-align: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
}

.progress-status {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

body.dark-mode .progress-bar-container {
    background: var(--gray-700);
}

/* Date Range Modal */
.date-range-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.date-range-modal .form-group {
    margin-bottom: 0;
}

/* Quantity Presets (POS Style) */
.quantity-preset-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.quantity-preset-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quantity-preset-btn:active {
    transform: translateY(0);
}

/* Live Calculation Display */
.live-calculation {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success-dark, #065f46);
    text-align: center;
    animation: slideIn 0.2s ease-out;
}

/* Keyboard Navigation Styles for Dropdowns */
.dropdown-item.dropdown-active {
    background-color: var(--gray-100);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    padding-left: calc(1rem - 3px) !important;
    /* Adjust padding to start text at same position */
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark mode support */
body.dark-mode .quantity-preset-btn {
    border-color: var(--gray-600);
}

body.dark-mode .quantity-preset-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

body.dark-mode .live-calculation {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: var(--success-light, #6ee7b7);
}

/* ===================================
   Minimized Progress Bar Styles 
   =================================== */
.progress-modal-overlay.minimized {
    background: transparent;
    pointer-events: none !important;
    display: block !important;
    /* Override flex */
    z-index: 9999;
}

.progress-modal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-modal.minimized {
    position: fixed;
    bottom: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 300px;
    padding: var(--space-md);
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--gray-200);
    z-index: 10000;
    margin: 0;
    transform: none;
    /* Reset modal centering transforms if any */
}

/* Header Adjustments for Minimized */
.progress-modal.minimized .progress-modal-header {
    margin-bottom: var(--space-sm);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-modal.minimized .progress-modal-header h3 {
    font-size: var(--font-size-md);
    margin: 0;
}

.progress-modal.minimized .progress-modal-header p {
    display: none;
    /* Hide description text */
}

/* Progress Bar Adjustments */
.progress-modal.minimized .progress-bar-container {
    height: 8px;
    margin-bottom: var(--space-xs);
}

.progress-modal.minimized .progress-text {
    font-size: var(--font-size-sm);
    margin-bottom: 0;
    text-align: right;
}

.progress-modal.minimized .progress-status {
    font-size: var(--font-size-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Minimize/Maximize Button */
.minimize-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    width: 32px;
    height: 32px;
}

.minimize-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.minimize-icon {
    transition: transform 0.3s;
}

.progress-modal.minimized .minimize-icon {
    transform: rotate(180deg);
}

/* Dark Mode Support */
body.dark-mode .progress-modal.minimized {
    background: var(--bg-secondary);
    border-color: var(--gray-700);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
/* ===================================
   Pricing Module Styles
   =================================== */

.pricing-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
}

.pricing-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-md);
}

.pricing-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-3xl);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.pricing-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 2px solid transparent;
    transition: all var(--transition-base);
    cursor: pointer;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.selected {
    border-color: var(--primary);
    background: linear-gradient(to bottom, var(--bg-primary), rgba(99, 102, 241, 0.05));
    transform: scale(1.02);
}

.pricing-card.best-value {
    border-top: 4px solid var(--warning);
}

.pricing-card .badge {
    position: absolute;
    top: 12px;
    right: -32px;
    background: var(--warning);
    color: white;
    padding: 4px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    text-align: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
}

.card-header h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-secondary);
}

.card-header .price {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin: var(--space-md) 0;
}

.card-header .currency {
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 4px;
}

.card-header .amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.card-header .period {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-left: 4px;
}

.savings-tag {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-xl) 0;
    text-align: left;
}

.features li {
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.radio-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    pointer-events: none; /* Handled by card click */
}

.checkout-section {
    background: var(--bg-tertiary); /* Light gray usually */
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--gray-200);
}

body.dark-mode .checkout-section {
    background: var(--bg-secondary);
    border-color: var(--gray-700);
}

.promo-code-area {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.promo-code-area input {
    flex: 1;
    padding: var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-transform: uppercase;
}

.total-summary {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) 0;
    border-top: 1px dashed var(--gray-300);
    border-bottom: 1px dashed var(--gray-300);
}

.total-summary .row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.total-summary .discount-row {
    color: var(--success);
    font-weight: 600;
}

.total-summary .total {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: var(--space-md);
}

.pay-btn {
    width: 100%;
    font-size: 1.2rem;
    padding: var(--space-md);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.secure-note {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Response for Mobile */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header .amount {
        font-size: 2.5rem;
    }
}

