/* 
 * Invoice Generator Styles - Enhanced Boqash Branding
 * RTL-ready with Boqash Branding and Beautiful Arabic Typography
 */

/* Import Beautiful Arabic Font */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

/* CSS Variables for Boqash Colors */
:root {
    /* Boqash brand colors as default */
    --primary-color: #904873;
    --secondary-color: #492152;
    --light-color: #f9f5f9;
    --accent-color: #b55a89;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --neutral-color: #6b7280;
    
    /* Layout variables */
    --container-max-width: 1200px;
    --border-radius: 8px;
    --box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Modern, Clean Invoice Generator CSS */
.boqash-invoice-generator {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #f8fafc;
    min-height: 100vh;
}

.invoice-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 40px;
}

/* Header Section - Much cleaner */
.invoice-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 40px;
    color: white;
    text-align: center;
    position: relative;
}

.logo-container {
    margin-bottom: 30px;
}

.logo-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(var(--primary-rgb), 0.05);
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

.logo-upload-label:hover {
    background: var(--accent-color);
    color: white;
}

.logo-upload-label.uploading {
    border-color: var(--primary-color);
    background: var(--accent-color);
    opacity: 0.7;
    cursor: wait;
}

.logo-upload-label.uploading .upload-icon {
    animation: spin 1s linear infinite;
}

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

.upload-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.upload-text {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 100%;
}

.logo-upload-input {
    display: none;
}

.logo-preview {
    width: 100%;
    text-align: center;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow);
}

.logo-preview img {
    max-width: 100%;
    max-height: 100px;
    margin-bottom: 10px;
    border-radius: 8px;
}

.remove-logo {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.remove-logo:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.invoice-title {
    text-align: center;
    order: 1;
    flex: 1;
}

.invoice-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.invoice-number {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 600;
}

/* Main Content Grid */
.invoice-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* Invoice Info Section */
.invoice-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.company-info, .invoice-dates {
    background: #f8fafc;
    padding: 30px;
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
}

.company-info h3, .invoice-dates h3 {
    color: #1e293b;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-info h3::before {
    content: '🏢';
    font-size: 1.5rem;
}

.invoice-dates h3::before {
    content: '📅';
    font-size: 1.5rem;
}

/* Settings Section - Much cleaner */
.invoice-settings {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.settings-section h3 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 30px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-section h3::before {
    content: '⚙️';
    font-size: 1.75rem;
}

/* Enhanced Currency Select Styling */
.currency-select {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    color: #1e293b;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6,9 12,15 18,9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 16px;
    cursor: pointer;
}

.currency-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
    background-color: #f8fafc;
}

.currency-select:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

/* Currency Select Options */
.currency-select option {
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    color: #1e293b;
}

.currency-select option:checked {
    background: #667eea;
    color: white;
}

/* Setting Labels Enhancement */
.setting-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

/* Currency Selection Container */
.currency-selection {
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* City Selection Container */
.city-selection {
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Make sure the selected values are always visible */
.currency-select[data-field="currency"] {
    background-color: #fff !important;
}

.currency-select[data-field="yerCity"] {
    background-color: #fff !important;
}

/* Feature Toggles - Much better spacing */
.optional-features {
    display: grid;
    gap: 30px;
}

.feature-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px;
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    transition: var(--transition);
    cursor: pointer;
}

.feature-toggle:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.feature-content {
    flex: 1;
}

.toggle-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 4px;
    display: block;
}

.feature-description {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Modern Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 34px;
    margin-left: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    transition: var(--transition);
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Settings inputs with better spacing */
.tax-settings, .discount-settings, .shipping-settings {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.tax-input, .discount-input, .shipping-input, .shipping-amount {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 8px;
    transition: var(--transition);
}

.tax-input:focus, .discount-input:focus, .shipping-input:focus, .shipping-amount:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Client Section */
.client-info {
    background: white;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.client-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
}

.client-info-header::before {
    content: '👤';
    font-size: 1.75rem;
}

/* Invoice Items - Better layout */
.invoice-items {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.invoice-items-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 20px 30px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 80px;
    gap: 20px;
    font-weight: 600;
    align-items: center;
}

.invoice-item {
    padding: 25px 30px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 80px;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

.invoice-item:hover {
    background: #f8fafc;
}

.item-input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.item-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.amount-text {
    font-weight: 600;
    color: #059669;
    font-size: 1.1rem;
}

/* Add Item Button */
.add-item-container {
    text-align: center;
    padding: 30px;
}

.add-item-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.add-item-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Totals Section */
.invoice-totals {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1.1rem;
}

.totals-row.total {
    border-bottom: none;
    border-top: 3px solid #667eea;
    padding-top: 20px;
    margin-top: 15px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.totals-amount {
    font-weight: 600;
    color: #059669;
}

/* Multi-currency section */
.multi-currency-totals {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #0ea5e9;
}

.currency-conversion-header {
    text-align: center;
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.currency-conversion-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Notes and Terms */
.invoice-notes, .invoice-terms {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.notes-label, .terms-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.notes-label::before {
    content: '📝';
}

.terms-label::before {
    content: '📋';
}

.notes-content, .terms-content {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    min-height: 120px;
    font-size: 1rem;
    line-height: 1.6;
    transition: var(--transition);
}

.notes-content:focus, .terms-content:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Action Buttons */
.invoice-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 40px 20px;
    flex-wrap: wrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.action-button.primary {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.action-button.secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-button:hover {
    transform: translateY(-2px);
}

.action-button.primary:hover {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

.action-button.secondary:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* Settings row for side-by-side layout */
.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}

/* Date input styling */
.date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.date-label {
    min-width: 120px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.date-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
    width: 100%;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Remove item button styling */
.remove-item {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.item-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content editable styling improvements */
[contenteditable="true"] {
    min-height: 20px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.5);
}

[contenteditable="true"]:hover {
    border-color: #e5e7eb;
    background: white;
}

[contenteditable="true"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    background: white;
}

[contenteditable="true"][data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    font-style: italic;
}

/* Responsive adjustments for the new layout */
@media (max-width: 768px) {
    .settings-row {
        grid-template-columns: 1fr;
        gap: 10px;
}

.date-row {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
}

.date-label {
        min-width: auto;
    }
}

/* RTL Support */
.boqash-invoice-generator {
    direction: rtl;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .invoice-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .invoice-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .boqash-invoice-generator {
        padding: 20px 10px;
    }
    
    .invoice-container {
        border-radius: 16px;
    }
    
    .invoice-header {
        padding: 30px 20px;
    }
    
    .invoice-content {
        padding: 30px 20px;
    }
    
    .invoice-items-header, .invoice-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .invoice-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-button {
        width: 100%;
        max-width: 300px;
    }
    
    .optional-features {
        gap: 20px;
    }
    
    .feature-toggle {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .invoice-title h1 {
        font-size: 2rem;
    }
    
    .feature-toggle {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .toggle-switch {
        margin-left: 0;
    }
}

/* Simple Color Picker Section */
.color-picker-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.color-picker-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.color-picker-title::before {
    content: '🎨';
    font-size: 1.75rem;
}

.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.color-control {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: var(--transition);
}

.color-control:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.color-control-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.simple-color-picker {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0 auto 15px auto;
    display: block;
}

.simple-color-picker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.simple-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
    border-radius: 50%;
}

.simple-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.color-value {
    width: 100%;
    max-width: 120px;
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    transition: var(--transition);
    margin: 0 auto;
}

.color-value:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.simple-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.simple-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    text-decoration: none;
    min-width: 120px;
    justify-content: center;
}

.simple-btn.reset {
    border-color: #6b7280;
    color: #6b7280;
}

.simple-btn.reset:hover {
    background: #6b7280;
    color: white;
    transform: translateY(-2px);
}

.simple-btn.random {
    border-color: #0ea5e9;
    color: #0ea5e9;
}

.simple-btn.random:hover {
    background: #0ea5e9;
    color: white;
    transform: translateY(-2px);
}

.simple-btn.save {
    border-color: #059669;
    color: #059669;
}

.simple-btn.save:hover {
    background: #059669;
    color: white;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .color-controls {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .simple-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .simple-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Remove all the complex theme section styles */
.theme-section,
.section-title,
.section-description,
.theme-preview,
.color-customization,
.color-row,
.color-group,
.color-label,
.color-icon,
.color-input-wrapper,
.color-picker,
.color-text,
.color-suggestions,
.color-suggestion,
.theme-actions,
.theme-action-btn,
.theme-notifications-container,
.theme-notification {
    display: none !important;
}

/* Remove any remaining crowded elements */
* {
    box-sizing: border-box;
}

/* Ensure proper spacing between all major sections */
.invoice-container > * + * {
    margin-top: 0;
}

/* Better visual hierarchy */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Improved form controls spacing */
input, select, textarea, [contenteditable] {
    margin-bottom: 0;
}

/* Clean up any remaining tight spacing */
.feature-toggle + .feature-toggle {
    margin-top: 0;
}

.totals-row + .totals-row {
    margin-top: 0;
}

/* ==============================================
   BOQASH INVOICE GENERATOR - ULTRA COMPACT CSS
   ============================================== */

/* CSS Custom Properties for Dynamic Theming */
:root {
    --primary-color: #904873;
    --secondary-color: #492152;
    --light-color: #f9f5f9;
    --accent-color: #b55a89;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --neutral-color: #6b7280;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* Base Container */
.boqash-invoice-generator {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
}

.invoice-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==============================================
   COMPACT HEADER - 3 COLUMN GRID
   ============================================== */
.invoice-header {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
}

.logo-section .logo-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 80px;
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: var(--light-color);
}

.logo-upload-label:hover {
    background: var(--accent-color);
    color: white;
}

.upload-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.upload-text {
    font-size: 12px;
    font-weight: 500;
}

.logo-upload-input {
    display: none;
}

.title-section h1 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

.number-section {
    text-align: left;
}

.invoice-number label {
    display: block;
    font-weight: bold;
    color: var(--neutral-color);
    margin-bottom: 5px;
}

.invoice-number span {
    display: inline-block;
    padding: 8px 15px;
    background: var(--light-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: bold;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
}

/* ==============================================
   🎨 PROMINENT THEME CUSTOMIZATION SECTION
   ============================================== */
.theme-section-prominent {
    background: linear-gradient(135deg, var(--light-color) 0%, #fff 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.theme-section-prominent h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
        margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Color Controls */
.color-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.color-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-group label {
    font-weight: bold;
    color: var(--neutral-color);
    font-size: 14px;
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker {
    width: 50px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
}

.color-text {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-family: monospace;
    font-size: 14px;
}

/* Preset Themes Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.theme-card {
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: white;
}

.theme-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.theme-card.active {
    border-color: var(--primary-color);
    background: var(--light-color);
}

.theme-colors {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.theme-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.theme-card span {
        font-size: 12px;
    font-weight: 500;
    color: var(--neutral-color);
    display: block;
}

/* ==============================================
   MAIN CONTENT GRID - 2 COLUMNS SIDE BY SIDE
   ============================================== */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Info Sections */
.info-section,
.dates-section,
.features-section {
    background: #f9fafb;
    border-radius: var(--border-radius);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.info-section h4,
.dates-section h4,
.features-section h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 8px;
}

.info-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    transition: var(--transition);
}

.info-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Settings Row */
.settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.setting-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    margin-bottom: 4px;
}

.compact-select {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
    width: 100%;
    font-weight: 400;
    appearance: menulist;
    cursor: pointer;
    height: 44px;
    line-height: 1.5;
    min-height: 44px;
}

.compact-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(144, 72, 115, 0.1);
}

/* Ensure dropdown options are readable */
.compact-select option {
    padding: 8px 12px;
    line-height: 1.5;
    font-size: 14px;
    background: white;
    color: #374151;
    height: auto;
    min-height: 32px;
}

/* Date Inputs */
.date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.date-row label {
    font-weight: 500;
    color: var(--neutral-color);
    font-size: 14px;
    margin-bottom: 5px;
}

.date-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
    width: 100%;
}

/* Compact Feature Toggles */
.feature-toggles-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.toggle-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

/* NEW: Input containers for toggles */
.tax-input-container,
.discount-input-container,
.shipping-input-container {
    display: none;
    margin-top: 8px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.tax-input-container.show,
.discount-input-container.show,
.shipping-input-container.show {
    display: block;
}

/* Feature inputs styling - matching height */
.feature-input {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #374151;
    width: 100%;
    margin-bottom: 8px;
    height: 44px;
    line-height: 1.5;
    min-height: 44px;
    box-sizing: border-box;
}

.feature-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(144, 72, 115, 0.1);
}

/* Discount specific layout */
.discount-input-container.show {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.discount-input-container .feature-input {
    margin-bottom: 0;
}

/* Invoice Items */
.invoice-items {
    margin-bottom: 30px;
    background: #f9fafb;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.items-header {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 80px;
    gap: 15px;
    font-weight: bold;
}

.items-body {
    padding: 0;
}

.invoice-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 80px;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.invoice-item:last-child {
    border-bottom: none;
}

.item-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.item-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.remove-item {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: var(--transition);
}

.remove-item:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.add-item-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    margin: 15px;
    transition: var(--transition);
}

.add-item-btn:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Totals */
    .invoice-totals {
    background: #f9fafb;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.totals-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.totals-row:last-child {
    border-bottom: none;
}

.total-row {
    font-weight: bold;
    font-size: 1.2em;
    color: var(--primary-color);
    border-top: 2px solid var(--primary-color);
    padding-top: 15px;
    margin-top: 10px;
}

.discount-amount {
    color: var(--success-color);
}

.multi-currency-totals {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.currency-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.9em;
    color: var(--neutral-color);
}

/* Notes Section */
.notes-section {
    margin-bottom: 30px;
}

.notes-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.notes-group label {
    display: block;
    font-weight: bold;
    color: var(--neutral-color);
    margin-bottom: 8px;
}

.notes-input {
        width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.notes-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Action Buttons */
.invoice-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    min-width: 120px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .color-controls {
        grid-template-columns: 1fr;
    }

    .theme-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .invoice-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .boqash-invoice-generator {
        padding: 10px;
    }

    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-row {
        grid-template-columns: 1fr;
    }

    .feature-toggles-compact {
        gap: 10px;
    }

    .invoice-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .items-header {
        display: none;
    }

    .notes-row {
        grid-template-columns: 1fr;
    }
    
    .invoice-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .theme-grid {
        grid-template-columns: 1fr;
    }

    .color-controls {
        gap: 15px;
    }

    .color-group {
        gap: 5px;
    }
}

/* Print Styles */
@media print {
    .theme-section-prominent,
    .invoice-actions {
        display: none !important;
    }

    .boqash-invoice-generator {
        background: white !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .main-content-grid {
        page-break-inside: avoid;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.boqash-invoice-generator {
    animation: fadeInUp 0.6s ease-out;
}

.theme-card,
.info-input,
.item-input,
.btn-primary,
.btn-secondary {
    transition: var(--transition);
}

.theme-card:hover,
.add-item-btn:hover,
.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
}

.color-picker:focus,
.color-text:focus,
.info-input:focus,
.item-input:focus {
    transform: scale(1.02);
}

.theme-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #333;
    }

    .theme-card,
    .info-input,
    .item-input {
        border-width: 2px;
    }
}

/* City selection visibility fix */
.city-selection {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Hide city selection when other currencies are selected */
.boqash-invoice-generator:not(.currency-yer) .city-selection {
    display: none !important;
}

.city-selection.hidden {
    display: none !important;
}

/* Multi-currency totals enhancement */
.multi-currency-totals {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.currency-conversion-header {
    font-weight: bold;
        margin-bottom: 10px;
    color: var(--primary-color);
    text-align: center;
}

.currency-conversion-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e2e8f0;
}

.currency-conversion-row:last-child {
    border-bottom: none;
}

/* PDF generation status */
.pdf-generation-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 10000;
    text-align: center;
    min-width: 300px;
}

.pdf-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toggle slider styling */
.toggle-slider-container {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-compact input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: all 0.3s ease;
    border-radius: 24px;
}

.toggle-slider::after {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    right: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.toggle-compact input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-compact input:checked + .toggle-slider::after {
    transform: translateX(-26px);
}

/* Custom theme card styling */
.theme-card.custom-theme {
    border: 2px dashed var(--primary-color);
    background: linear-gradient(135deg, rgba(144, 72, 115, 0.05), rgba(73, 33, 82, 0.05));
}

.theme-card.custom-theme:hover {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(144, 72, 115, 0.1), rgba(73, 33, 82, 0.1));
}

.theme-card.custom-theme.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(144, 72, 115, 0.15), rgba(73, 33, 82, 0.15));
    box-shadow: 0 0 0 2px rgba(144, 72, 115, 0.2);
}

.custom-color-preview {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: white;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
}

/* Custom Theme Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.9);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

.custom-color-section h4 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.color-selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.color-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-input-group label {
    font-weight: 600;
    color: #374151;
    font-size: 16px;
}

.color-picker-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.modal-color-picker {
    width: 60px;
    height: 60px;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-color-picker:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.modal-color-text {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: monospace;
    text-transform: uppercase;
}

.modal-color-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(144, 72, 115, 0.1);
}

.color-preview {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.theme-preview-section {
    margin-bottom: 30px;
}

.theme-preview-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-button {
    padding: 12px 24px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
}

.preview-button.primary-btn {
    background: var(--primary-color);
    color: white;
}

.preview-button.secondary-btn {
    background: var(--secondary-color);
    color: white;
}

.preview-text p {
    color: #374151;
    margin: 0;
    line-height: 1.6;
}

.preset-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.preset-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.preset-color-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preset-color-option.selected {
    border-color: var(--primary-color);
    background: rgba(144, 72, 115, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(144, 72, 115, 0.2);
}

.preset-color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.preset-color-option .preset-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preset-color-option span {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.modal-footer .btn-primary,
.modal-footer .btn-secondary {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-footer .btn-primary {
    background: var(--primary-color);
    color: white;
}

.modal-footer .btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.modal-footer .btn-secondary {
    background: #6b7280;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* Responsive modal design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .color-selection-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .preset-colors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-footer {
        flex-direction: column;
    }
}
