/**
 * ConvMaster - VAT Calculator Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    font-weight: 700;
    font-size: 1.25rem;
}

.tool-header__icon .icon--blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   CURRENT DATE BANNER
   ===================================================== */
.current-date-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.current-date-banner__icon {
    font-size: 1.25rem;
}

.current-date-banner__text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   CALCULATOR WIDGET
   ===================================================== */
.vat-calc-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =====================================================
   TOOLBAR
   ===================================================== */
.vat-calc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    flex-wrap: wrap;
    gap: 1rem;
}

.vat-calc-toolbar__left,
.vat-calc-toolbar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Design Selector */
.design-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.design-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.design-buttons {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 0.25rem;
}

.design-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.design-btn:hover {
    background: var(--bg-tertiary);
}

.design-btn.active {
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Popup Button */
.btn-popup {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-popup:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.btn-popup__icon {
    font-size: 1rem;
}

/* =====================================================
   CALCULATOR CONTAINER
   ===================================================== */
.vat-calc-container {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 0;
    min-height: 520px;
}

/* =====================================================
   CALCULATOR MAIN
   ===================================================== */
.vat-calculator {
    padding: 1.5rem;
}

/* =====================================================
   COUNTRY SELECTION
   ===================================================== */
.vat-country-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.vat-country-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.vat-country-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    margin-bottom: 0.25rem;
}

.vat-country-flag img {
    width: 32px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.vat-country-select {
    flex: 1;
    min-width: 180px;
}

.vat-country-select label,
.vat-rate-type label,
.vat-manual-rate label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.vat-country-select select,
.vat-rate-type select {
    width: 100%;
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: all 0.2s ease;
}

.vat-country-select select:focus,
.vat-rate-type select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.vat-rate-type {
    min-width: 150px;
}

.vat-manual-rate {
    min-width: 100px;
    max-width: 140px;
}

.vat-manual-rate .vat-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.vat-manual-rate .vat-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.vat-manual-rate input {
    flex: 1;
    padding: 0.625rem 0.5rem 0.625rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    min-width: 0;
    -moz-appearance: textfield;
}

/* Hide number input spinners */
.vat-manual-rate input::-webkit-outer-spin-button,
.vat-manual-rate input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.vat-manual-rate input::placeholder {
    color: var(--text-tertiary);
}

.vat-manual-rate .vat-input-suffix {
    padding: 0.625rem 0.75rem 0.625rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Current rate indicator */
.vat-current-rate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: #22c55e;
}

.vat-current-rate__label {
    color: var(--text-secondary);
    font-weight: 400;
}

.vat-country-info {
    display: none; /* Hidden by default, shown by JS when there's a note */
    margin-top: 0.875rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.vat-country-info strong {
    color: #3b82f6;
    font-weight: 600;
}

/* =====================================================
   TABS NAVIGATION
   ===================================================== */
.vat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.vat-tab {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vat-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.vat-tab.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

.vat-tab__icon {
    font-size: 1rem;
}

/* =====================================================
   TAB PANELS
   ===================================================== */
.vat-panels {
    position: relative;
}

.vat-panel {
    display: none;
}

.vat-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.vat-panel__desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.vat-panel__formula {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #3b82f6;
    margin-bottom: 1.25rem;
}

/* =====================================================
   FORM ELEMENTS
   ===================================================== */
.vat-form {
    margin-bottom: 1.5rem;
}

.vat-form__row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.vat-form__row--column {
    flex-direction: column;
    align-items: stretch;
}

.vat-form__operator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-bottom: 0.25rem;
}

.vat-input-group {
    flex: 1;
    min-width: 120px;
}

.vat-input-group--large {
    max-width: 300px;
}

.vat-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.vat-input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.vat-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.vat-input-group input::placeholder {
    color: var(--text-tertiary);
}

/* Hide number input spinners globally */
.vat-input-group input[type="number"],
.vat-input-wrapper input[type="number"] {
    -moz-appearance: textfield;
}

.vat-input-group input[type="number"]::-webkit-outer-spin-button,
.vat-input-group input[type="number"]::-webkit-inner-spin-button,
.vat-input-wrapper input[type="number"]::-webkit-outer-spin-button,
.vat-input-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Input with prefix/suffix */
.vat-input-wrapper {
    position: relative;
    display: flex;
}

.vat-input-wrapper input {
    padding-right: 2.5rem;
}

.vat-input-wrapper--currency input {
    padding-left: 2.5rem;
    padding-right: 1rem;
}

.vat-input-prefix {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-tertiary);
    pointer-events: none;
}

.vat-input-suffix {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-tertiary);
    pointer-events: none;
}

/* Toggle buttons */
.vat-toggle-group {
    margin-bottom: 0.5rem;
    width: 100%;
}

.vat-toggle-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.vat-toggle-buttons {
    display: flex;
    gap: 0.5rem;
}

.vat-toggle {
    flex: 1;
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vat-toggle:hover {
    background: var(--bg-tertiary);
}

.vat-toggle.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Calculate button */
.btn-calculate {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

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

/* =====================================================
   RESULTS
   ===================================================== */
.vat-result {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    animation: fadeIn 0.3s ease;
}

.vat-result__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.vat-result__item {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.vat-result__item--highlight {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.vat-result__item--total {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.vat-result__item--total .vat-result__label,
.vat-result__item--total .vat-result__value {
    color: #fff;
}

.vat-result__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.vat-result__value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.vat-result__rate {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.vat-result__rate strong {
    color: #3b82f6;
}

/* Single result display */
.vat-result__single {
    text-align: center;
    padding: 1rem;
}

.vat-result__big-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.vat-result__big-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #3b82f6;
}

.vat-result__breakdown {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.vat-result__explanation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Compare table */
.vat-compare-table {
    overflow-x: auto;
}

.vat-compare-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.vat-compare-table th,
.vat-compare-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.vat-compare-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.vat-compare-table td {
    color: var(--text-primary);
}

.vat-compare-table tr:hover td {
    background: var(--bg-secondary);
}

.vat-compare-table .country-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vat-compare-table .country-flag {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

/* =====================================================
   QUICK EXAMPLES
   ===================================================== */
.vat-quick-examples {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.vat-quick-examples label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.vat-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vat-quick-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vat-quick-btn:hover {
    background: var(--bg-tertiary);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* =====================================================
   HISTORY SIDEBAR
   ===================================================== */
.vat-history {
    border-left: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

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

.vat-history__header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.vat-history__clear {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.vat-history__clear:hover {
    opacity: 1;
    background: var(--bg-tertiary);
}

.vat-history__list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.vat-history__empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.vat-history__item {
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vat-history__item:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.vat-history__item-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.25rem;
}

.vat-history__item-calc {
    color: var(--text-primary);
    font-weight: 500;
}

.vat-history__item-result {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* =====================================================
   PRIVACY NOTICE
   ===================================================== */
.vat-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.vat-privacy__icon {
    font-size: 1rem;
}

/* =====================================================
   MESSAGES
   ===================================================== */
.vat-message {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    animation: fadeIn 0.2s ease;
}

.vat-message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.vat-message--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.tool-section > p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.feature-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* VAT Rates Grid */
.vat-rates-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.vat-rate-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.vat-rate-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.vat-rate-card__flag {
    width: 28px;
    height: auto;
    border-radius: 2px;
    flex-shrink: 0;
}

.vat-rate-card__info {
    flex: 1;
    min-width: 0;
}

.vat-rate-card__country {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vat-rate-card__rate {
    font-size: 0.85rem;
    color: #3b82f6;
    font-weight: 600;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.step-card {
    position: relative;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.step-card__number {
    position: absolute;
    top: -0.75rem;
    left: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50%;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.5rem 0 0.5rem;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* FAQ List */
.faq-list {
    margin-top: 1.5rem;
}

.faq-item {
    margin-bottom: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary:hover {
    background: var(--bg-secondary);
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =====================================================
   POPUP STYLES
   ===================================================== */
.vat-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.vat-popup {
    position: absolute;
    width: 500px;
    max-width: 95vw;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vat-popup__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: move;
    user-select: none;
}

.vat-popup__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vat-popup__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vat-popup__close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.vat-popup__content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Popup calculator styles (simplified) */
.vat-popup__content .vat-country-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.vat-popup__content .vat-country-row {
    flex-direction: column;
    align-items: stretch;
}

.vat-popup__content .vat-country-flag {
    display: none;
}

.vat-popup__content .vat-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.vat-popup__content .vat-tab {
    white-space: nowrap;
    flex-shrink: 0;
}

.vat-popup__content .vat-tab__text {
    display: none;
}

.vat-popup__content .vat-tab__icon {
    font-size: 1.25rem;
}

.vat-popup__content .vat-quick-examples {
    display: none;
}

.vat-popup__content .vat-result__grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* Popup Calculator Simplified */
.vat-popup-calc {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vat-popup-calc__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vat-popup-calc__field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.vat-popup-calc .vat-input-wrapper {
    display: flex;
    align-items: stretch;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.vat-popup-calc .vat-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.vat-popup-calc .vat-input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    min-width: 0;
    -moz-appearance: textfield;
}

/* Hide number input spinners in popup */
.vat-popup-calc .vat-input-wrapper input::-webkit-outer-spin-button,
.vat-popup-calc .vat-input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.vat-popup-calc .vat-input-prefix {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0.75rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.vat-popup-calc .vat-input-suffix {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0.75rem 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-left: 1px solid var(--border-color);
    flex-shrink: 0;
}

.vat-popup-calc .btn-calculate {
    margin-top: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vat-popup-calc .btn-calculate:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
}

.vat-popup-calc__results {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.vat-popup-calc__result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.vat-popup-calc__result-row + .vat-popup-calc__result-row {
    border-top: 1px solid var(--border-color);
}

.vat-popup-calc__result-row--highlight {
    color: #3b82f6;
    font-weight: 500;
}

.vat-popup-calc__result-row--total {
    font-size: 1.1rem;
    font-weight: 600;
    color: #22c55e;
}

/* =====================================================
   DESIGN VARIATIONS
   ===================================================== */

/* Modern Design */
.vat-calculator[data-design="modern"] {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin: -0.5rem;
    padding: 2rem;
}

.vat-calculator[data-design="modern"] .vat-tab {
    border-radius: 9999px;
}

.vat-calculator[data-design="modern"] .btn-calculate {
    border-radius: 9999px;
}

.vat-calculator[data-design="modern"] .vat-result {
    border-radius: var(--radius-xl, 1rem);
}

.vat-calculator[data-design="modern"] .vat-input-group input,
.vat-calculator[data-design="modern"] .vat-country-select select,
.vat-calculator[data-design="modern"] .vat-rate-type select {
    border-radius: var(--radius-lg);
}

/* Minimal Design */
.vat-calculator[data-design="minimal"] .vat-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.5rem 0.75rem;
}

.vat-calculator[data-design="minimal"] .vat-tab:hover {
    background: transparent;
    border-bottom-color: var(--border-color);
}

.vat-calculator[data-design="minimal"] .vat-tab.active {
    background: transparent;
    border-color: transparent;
    border-bottom-color: #3b82f6;
}

.vat-calculator[data-design="minimal"] .btn-calculate {
    background: #3b82f6;
    box-shadow: none;
}

.vat-calculator[data-design="minimal"] .btn-calculate:hover {
    background: #2563eb;
    transform: none;
}

.vat-calculator[data-design="minimal"] .vat-result {
    background: transparent;
    border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0;
    padding: 1.25rem 0;
}

.vat-calculator[data-design="minimal"] .vat-input-group input,
.vat-calculator[data-design="minimal"] .vat-country-select select,
.vat-calculator[data-design="minimal"] .vat-rate-type select {
    border-radius: 0;
    border: none;
    border-bottom: 2px solid var(--border-color);
    background: transparent;
}

.vat-calculator[data-design="minimal"] .vat-input-group input:focus,
.vat-calculator[data-design="minimal"] .vat-country-select select:focus,
.vat-calculator[data-design="minimal"] .vat-rate-type select:focus {
    border-bottom-color: #3b82f6;
    box-shadow: none;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
    .vat-calc-container {
        grid-template-columns: 1fr;
    }

    .vat-history {
        border-left: none;
        border-top: 1px solid var(--border-color);
        max-height: 300px;
    }

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

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

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

@media (max-width: 640px) {
    .tool-page {
        padding: 1rem;
    }

    .tool-header {
        flex-direction: column;
        text-align: center;
    }

    .tool-header__text h1 {
        font-size: 1.5rem;
    }

    .vat-calc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .vat-calc-toolbar__left,
    .vat-calc-toolbar__right {
        justify-content: center;
    }

    .vat-country-row {
        flex-direction: column;
        align-items: stretch;
    }

    .vat-country-flag {
        display: none;
    }

    .vat-rate-type,
    .vat-manual-rate {
        width: 100%;
        max-width: none;
    }

    .vat-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .vat-tab {
        flex-shrink: 0;
    }

    .vat-tab__text {
        display: none;
    }

    .vat-form__row {
        flex-direction: column;
    }

    .vat-form__operator {
        margin: 0.5rem 0;
    }

    .vat-input-group--large {
        max-width: none;
    }

    .vat-result__grid {
        grid-template-columns: 1fr;
    }

    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .vat-rates-grid {
        grid-template-columns: 1fr;
    }

    .vat-popup {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .vat-result__big-value {
        font-size: 2rem;
    }

    .vat-compare-table {
        font-size: 0.8rem;
    }

    .vat-compare-table th,
    .vat-compare-table td {
        padding: 0.5rem;
    }
}

/* =====================================================
   DARK THEME ADJUSTMENTS
   ===================================================== */
[data-theme="dark"] .vat-popup-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .design-btn.active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .vat-country-flag {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .vat-compare-table th {
    background: var(--bg-card);
}

/* =====================================================
   HIDDEN UTILITY
   ===================================================== */
[hidden] {
    display: none !important;
}
