* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 20px;
    color: #4b5563;
    font-size: 1.3rem;
    font-weight: 500;
}

.calculator-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Tabs */
.tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #6c757d;
}

.tab-btn:hover {
    background-color: #e9ecef;
}



.tab-btn.active {
    background-color: #fff;
    color: #007bff;
    border-bottom: 3px solid #007bff;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

#payment-calculators .payment-subtabs,
#quick-pencil .sale-type-tabs {
    margin-bottom: 20px;
    padding: 8px;
    border: 1px solid #dbe4ff;
    border-radius: 12px;
    background: linear-gradient(180deg, #f5f7ff 0%, #edf2ff 100%);
    gap: 8px;
}

#payment-calculators .payment-subtabs .tab-btn,
#quick-pencil .sale-type-tabs .tab-btn {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #475569;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

#payment-calculators .payment-subtabs .tab-btn:hover,
#quick-pencil .sale-type-tabs .tab-btn:hover {
    background-color: #ffffff;
    border-color: #c8d3ff;
    color: #2563eb;
}

#payment-calculators .payment-subtabs .tab-btn:focus-visible,
#quick-pencil .sale-type-tabs .tab-btn:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
    border-color: #2563eb;
}

#payment-calculators .payment-subtabs .tab-btn.active,
#quick-pencil .sale-type-tabs .tab-btn.active {
    background: #ffffff;
    color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.18);
}

#payment-calculators .info-heading {
    margin-bottom: 20px;
}

#payment-calculators .calculator-pane {
    display: none;
}

#payment-calculators .calculator-pane.active {
    display: block;
}

/* Form Styling */
form {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #4b5563;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

input,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

input::placeholder {
    color: #9ca3af;
}

input:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 0;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.8125rem;
    color: #6b7280;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.calculate-btn,
.clear-btn {
    flex: 1;
    padding: 14px 24px;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calculate-btn {
    background-color: #3b82f6;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.calculate-btn:hover {
    background-color: #2563eb;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.calculate-btn:active {
    transform: translateY(0);
}

.clear-btn {
    background-color: #6b7280;
    border-radius: 6px;
}

.clear-btn:hover {
    background-color: #4b5563;
}

/* Results */
.result {
    margin: 30px 0 20px;
    padding: 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    text-align: center;
    border: 2px solid #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

.result.hidden {
    display: none;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.result h3 {
    margin-bottom: 12px;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #059669;
    text-shadow: 0 2px 4px rgba(5, 150, 105, 0.1);
}

/* Info Box */
.info-box {
    background-color: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #1e40af;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

/* Info Heading */
.info-heading {
    background-color: #e9f7ff;
    border-left: 4px solid #007bff;
    padding: 10px 15px;
    margin-bottom: 20px;
    color: #007bff;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 800;
}

/* Result Details */
.result-details {
    margin-top: 15px;
    text-align: left;
}

.result-details p {
    margin: 5px 0;
    font-size: 1rem;
    color: #333;
}

/* Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    padding: 0;
    transform: scale(1.2);
}

.checkbox-group label {
    margin: 0;
}

/* Keyboard Shortcuts Info */
.keyboard-info {
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}

.info-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.info-toggle:hover,
.info-toggle.active {
    background-color: #f8f9fa;
    color: #007bff;
}

.info-content {
    display: none;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 14px;
    color: #495057;
    border-left: 3px solid #007bff;
}

.info-content p {
    margin: 5px 0;
}

.info-content.show {
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .tab-btn {
        padding: 10px;
        font-size: 14px;
    }

    .tab-content {
        padding: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }
}


@media print {

    body>header,
    .tabs,
    .tab-pane:not(.active) {
        display: none !important;
    }

    .calculator-container,
    .tab-content,
    .tab-pane.active {
        display: block !important;
        visibility: visible !important;
        /* Ensure active pane is visible */
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Ensure all children of the active tab pane are visible */
    .tab-pane.active * {
        visibility: visible !important;
    }

    /* Remove unnecessary borders from debug */
    * {
        border: none !important;
    }
}

/* Disclosure Banner */
.disclosure-banner {
    background-color: transparent;
    border-top: none;
    padding: 15px 20px;
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
    font-style: italic;
    margin-top: 20px;
    border-radius: 0 0 8px 8px;
}

.disclosure-banner p {
    margin: 0;
    line-height: 1.5;
}
