/* Modern PVN Calculator Styles */
:root {
    /* Logo Colors */
    --logo-svg-color: #2463eb;
    --logo-text-color: #1e293b;
    --logo-shadow-color: hsla(224, 82%, 51%, 0.3);

    /* Light theme colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --card-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-focus: #2563eb;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --card-bg: #ffffff;
    --accent-color: #f59e0c;
    --text-on-accent: #ffffff;
    --info-color: #3b82f6;
}

/* Dark theme colors */
.dark-theme {
    /* Logo Colors */
    --logo-svg-color: #edf6f7;
    --logo-text-color: #f8fafc;
    --logo-shadow-color: hsla(188, 56%, 95%, 0.3);

    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #94a3b8;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --card-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #475569;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --input-bg: #1e293b;
    --input-border: #475569;
    --input-focus: #3b82f6;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --card-bg: #1e293b;
    --accent-color: #f59e0c;
    --text-on-accent: #ffffff;
    --info-color: #3b82f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: var(--background-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background-color: var(--card-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-svg {
    width: 32px;
    height: 32px;
    color: var(--logo-svg-color);
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 3px var(--logo-shadow-color));
}

.logo-svg rect {
    fill: #ffc43a;
    transition: fill 0.3s ease;
}

.logo:hover .logo-svg {
    transform: rotate(-10deg) scale(1.15) translateY(-2px);
    filter: drop-shadow(0 4px 6px var(--logo-shadow-color));
}

.logo-text {
    font-family: 'Gugi', cursive;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--logo-text-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-btn, .theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    background-color: var(--surface-color);
}

.separator-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    background-color: var(--surface-color);
}

.separator-icon {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.menu-btn:hover, .theme-btn:hover, .separator-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Theme button icons */
.theme-btn .fa-sun {
    display: none;
}

.dark-theme .theme-btn .fa-moon {
    display: none;
}

.dark-theme .theme-btn .fa-sun {
    display: block;
}

/* Navigation Menu */
.navigation-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--background-color);
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.navigation-menu.active {
    left: 0;
}

.nav-content {
    padding: 2rem 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.close-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-menu-btn:hover {
    background-color: var(--surface-color);
    color: var(--text-primary);
}

.nav-links {
    list-style: none;
    padding: 0;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-size: 16px;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--surface-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

.calculator-card {
    background-color: var(--card-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* VAT Section */
.vat-section {
    margin-bottom: 2rem;
}

.vat-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.vat-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    align-items: center;
}

.vat-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    background-color: var(--surface-color);
}

.vat-option:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.vat-option input[type="radio"] {
    display: none;
}

.vat-radio {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.vat-option input[type="radio"]:checked + .vat-radio {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.vat-option input[type="radio"]:checked + .vat-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.vat-label {
    font-weight: 600;
    font-size: 16px;
}

.custom-vat {
    grid-column: 1 / -1;
}

.custom-vat input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

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

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 16px;
}

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

.input-wrapper input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

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

/* Clear button default state */
.clear-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: none;
}

.clear-btn:hover {
    color: var(--error-color);
    background-color: rgba(239, 68, 68, 0.1);
}

.clear-btn.visible {
    display: block;
}

/* Results section default state */
.results-section {
    margin-bottom: 2rem;
    display: block;
}

.result-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.result-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 16px;
}

.result-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-value span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 80px;
    text-align: right;
}

.copy-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

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

.copy-btn.copied {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--surface-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 16px;
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Info Section */
.info-section, .faq-section {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.info-card, .faq-card {
    background-color: var(--card-color);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.info-card h3, .faq-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.info-card p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
    font-size: 16px;
}

.info-card li::before {
    content: '\2022';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* FAQ Section */
.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.faq-content {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.faq-content p {
    font-size: 16px;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.faq-content p:last-child {
    margin-bottom: 0;
}

.faq-content ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.faq-content li {
    font-size: 16px;
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.5;
}

.faq-content li:last-child {
    margin-bottom: 0;
}

.faq-content li::before {
    content: '\2022';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2em;
}

.faq-example {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background-color: var(--surface-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.faq-example h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 16px;
    line-height: 1.4;
}

.faq-example ul {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.faq-example li {
    font-size: 16px;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.faq-example li:last-child {
    margin-bottom: 0;
}

.faq-example code {
    display: block;
    background-color: var(--surface-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 0.75rem 0;
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
    word-wrap: break-word;
    line-height: 1.4;
}

/* Standalone code elements in FAQ content */
.faq-content code {
    display: block;
    background-color: var(--surface-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 0.75rem 0;
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
    word-wrap: break-word;
    line-height: 1.4;
}

/* Footer */
.footer {
    background-color: var(--card-color);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .calculator-header h1 {
        font-size: 1.75rem;
    }
    
    .vat-options {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
    
    .actions-section {
        flex-direction: column;
    }
    
    .action-btn {
        min-width: auto;
    }
    
    .result-item {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }
    
    .result-label {
        flex: 1;
        min-width: 0;
        font-size: 14px;
    }
    
    .result-value {
        flex-shrink: 0;
        justify-content: flex-end;
    }
    
    .result-value span {
        font-size: 1.1rem;
        min-width: 70px;
    }
    
    .nav-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 1rem;
    }
    
    .vat-options {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.75rem;
    }
    
    .vat-option {
        justify-content: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
}

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

.calculator-card {
    animation: fadeIn 0.6s ease-out;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Ensure all text elements have consistent font size */
p, li, label, span, div, button, input, textarea, select {
    font-size: 16px;
}

/* Headings can have different sizes */
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 1rem; }

/* Small text for specific elements */
small, .small-text {
    font-size: 14px;
}

/* Large text for specific elements */
.large-text {
    font-size: 18px;
}

/* Extra large text for specific elements */
.xlarge-text {
    font-size: 20px;
}

/* Final price highlighting */
.final-price-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    border: 2px solid var(--primary-color);
    transition: none;
    transform: none;
}

.final-price-highlight:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.final-price-highlight .result-item {
    padding: 0;
    background-color: transparent;
}

.final-price-highlight .result-item:hover {
    background-color: transparent;
}

.final-price-highlight .result-label {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.final-price-highlight .result-value {
    color: white;
}

.final-price-highlight .result-value span {
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
}

.final-price-highlight .copy-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.final-price-highlight .copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.dark-theme .final-price-highlight {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

@media (max-width: 768px) {
    .final-price-highlight {
        padding: 1rem;
    }
    
    .final-price-highlight .result-value span {
        font-size: 1.25rem;
    }
}

/* Text Ad Styles */
.text-ad-container {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.text-ad-container-main {
    max-width: 600px; /* Match calculator card width */
    margin: 2rem auto;
    padding: 0 1rem;
}

.text-ad {
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    gap: 1rem;
}

.text-ad:hover {
    border-color: var(--primary-color);
    background-color: var(--card-color);
    box-shadow: 0 4px 10px var(--shadow-color);
    transform: translateY(-2px);
}

.ad-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.ad-text {
    font-size: 15px;
    line-height: 1.5;
}

.dark-theme .text-ad {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .text-ad {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Fix for checkbox alignment */
label.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 0 !important; /* Override any other label margins */
    font-weight: 400 !important; /* Override any other label weights */
}

label.checkbox-wrapper span {
    line-height: 1; /* Tightly align text to checkbox */
}

/* Original checkbox styles for reference (no changes needed here) */
.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.checkbox-wrapper:hover .checkbox-custom {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.checkbox-wrapper span {
    color: var(--text-primary);
    font-size: 16px;
    line-height: normal;
}

/* Additional input group spacing for salary calculator */
.vat-section .input-group {
    margin-bottom: 1rem;
}

.vat-section .input-group:last-child {
    margin-bottom: 0;
}

/* Enhanced result item for salary calculator */
.result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.result-item:hover {
    background-color: var(--surface-color);
}

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

/* Responsive adjustments for salary calculator */
@media (max-width: 768px) {
    .checkbox-wrapper {
        padding: 0.75rem 0;
    }
    
    .checkbox-wrapper span {
        font-size: 15px;
    }
    
    .vat-section .input-group {
        margin-bottom: 1.25rem;
    }
}

/* Select element styles for salary calculator */
.input-wrapper select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background-color: var(--input-bg);
    color: var(--text-primary);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

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

.dark-theme .input-wrapper select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%9ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Helper for negative/deduction values */
.text-danger {
    color: var(--error-color);
}

/* Formula Section Styles */
.formula-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.formula-section h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.formula-section h3::before {
    content: "📐";
    font-size: 18px;
}

.formulas {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.formula {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
}

.formula h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.formula p {
    margin-bottom: 0.5rem;
    text-align: left;
    font-size: 16px;
    line-height: 1.6;
}

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

.formula-example {
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
    font-size: 16px;
}

/* MathJax styling improvements */
.mjx-chtml {
    font-size: 16px !important;
}

.formula .mjx-chtml {
    display: block !important;
    text-align: left !important;
    margin: 0.5rem 0;
}

/* Code-style formula boxes */
.formula {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
}

/* Instruction text styling */
.calculator-instruction {
    background: var(--accent-color);
    color: var(--text-on-accent);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
    font-size: 16px;
    border: 1px solid var(--accent-color);
}

/* Fix result box spacing and styling */
.procentu-kalkulators .results-section {
    margin-top: 1.5rem;
}

.procentu-kalkulators .result-card {
    margin-bottom: 0;
}

.procentu-kalkulators .result-item {
    padding: 1rem;
    display: block;
}

.procentu-kalkulators .result-label {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    top: 0;
    left: 0;
}

.procentu-kalkulators .result-label i {
    flex-shrink: 0;
    color: #f59e0c;
}

.procentu-kalkulators .result-label span {
    flex: 1;
}

.procentu-kalkulators .result-value {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin-top: 0.5rem;
}

.procentu-kalkulators .result-value span {
    font-weight: 400;
    font-size: 16px;
    display: block;
    margin-bottom: 0.5rem;
    width: 100%;
}

/* Mathematical result styling */
.procentu-kalkulators .result-value {
    font-family: 'Courier New', monospace;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    overflow-x: auto;
    box-sizing: border-box;
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Ensure result content uses full width */
.procentu-kalkulators .result-value span {
    width: 100%;
    display: block;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Responsive improvements for results */
@media (max-width: 768px) {
    .procentu-kalkulators .results-section {
        margin-top: 1rem;
    }
    
    .procentu-kalkulators .result-value {
        font-size: 14px;
        padding: 0.75rem;
        line-height: 1.5;
        overflow-x: auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    .procentu-kalkulators .result-value span {
        font-size: 14px;
        margin-bottom: 0;
        line-height: 1.4;
    }
    
    .procentu-kalkulators .result-item {
        padding: 0.75rem;
    }
    
    .procentu-kalkulators .result-label {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .procentu-kalkulators .result-value {
        font-size: 13px;
        padding: 0.5rem;
        line-height: 1.4;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    .procentu-kalkulators .result-value span {
        font-size: 13px;
        margin-bottom: 0;
        line-height: 1.4;
    }
    
    .procentu-kalkulators .result-item {
        padding: 0.5rem;
    }
}

/* Responsive adjustments for formulas */
@media (max-width: 768px) {
    .formula-section {
        padding: 1rem;
    }
    
    .formula {
        padding: 0.75rem;
        font-size: 14px;
    }
    
    .formula p {
        font-size: 14px;
    }
    
    .mjx-chtml {
        font-size: 14px !important;
    }
    
    .calculator-instruction {
        font-size: 14px;
        padding: 0.5rem 0.75rem;
    }
}

/* Prevent horizontal overflow for Procentu Kalkulators page */
.procentu-kalkulators {
    overflow-x: hidden;
}

.procentu-kalkulators .container {
    overflow-x: hidden;
}

.procentu-kalkulators .calculator-card {
    overflow-x: hidden;
}

.procentu-kalkulators .input-section {
    overflow-x: hidden;
}

.procentu-kalkulators .formula-section {
    overflow-x: hidden;
}

/* Fix header-actions hover issue for Procentu Kalkulators */
.procentu-kalkulators .header-actions {
    overflow: visible;
    position: relative;
}

.procentu-kalkulators .header-actions button {
    overflow: visible;
    position: relative;
}

.procentu-kalkulators .header-actions button:hover {
    transform: none;
    overflow: visible;
}

/* Hide comma toggle button for Procentu Kalkulators */
/* .procentu-kalkulators .separator-btn {
    display: none;
} */