/* Базовые стили для калькулятора */
.vat-calculator-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.vat-calculator-container {
    max-width: 900px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    line-height: 1.5;
    padding: 0 15px;
}

/* Заголовок */
.vat-header {
    text-align: center;
    margin-bottom: 30px;
}

.vat-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vat-header p {
    font-size: 16px;
    color: #718096;
}

/* Карточка калькулятора */
.vat-calculator-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

/* Шапка калькулятора */
.vat-calculator-header {
    background: linear-gradient(135deg, #38b2ac 0%, #319795 100%);
    padding: 20px;
    color: white;
}

.vat-calculator-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.vat-calculator-header p {
    text-align: center;
    opacity: 0.9;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Переключатели режимов */
.vat-tab-group {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 4px;
    margin: 0 auto;
    max-width: 300px;
}

.vat-tab-button {
    flex: 1;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.vat-tab-button.vat-tab-active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Тело калькулятора */
.vat-calculator-body {
    padding: 25px;
}

/* Сетка для ПК */
.vat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Группы ввода */
.vat-input-group {
    margin-bottom: 20px;
}

.vat-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 15px;
}

.vat-input-wrapper {
    position: relative;
}

.vat-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.vat-input:focus {
    outline: none;
    border-color: #38b2ac;
    box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
}

.vat-currency {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.vat-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.vat-select:focus {
    outline: none;
    border-color: #38b2ac;
    box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
}

/* Кнопки */
.vat-button {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 8px;
}

.vat-button-primary {
    background: #38b2ac;
    color: white;
}

.vat-button-primary:hover {
    background: #319795;
}

.vat-button-secondary {
    background: #4299e1;
    color: white;
}

.vat-button-secondary:hover {
    background: #3182ce;
}

/* Группа результатов */
.vat-result-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Карточка результата */
.vat-result-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 18px;
    border-left: 4px solid #38b2ac;
}

.vat-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.vat-result-label {
    color: #4a5568;
    font-size: 15px;
}

.vat-result-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 17px;
}

.vat-result-total .vat-result-value {
    font-size: 20px;
    color: #2c7a7b;
}

.vat-result-words {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #718096;
    margin-top: 8px;
}

.vat-copy-button {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.vat-copy-button:hover {
    color: #38b2ac;
    background: rgba(56, 178, 172, 0.1);
}

/* Подвал калькулятора */
.vat-calculator-footer {
    background: #f7fafc;
    padding: 15px 25px;
    text-align: center;
    color: #718096;
    font-size: 14px;
    border-top: 1px solid #e2e8f0;
}

/* История расчетов */
.vat-history-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.vat-history-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vat-history-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vat-clear-history {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.vat-clear-history:hover {
    background: rgba(229, 62, 62, 0.1);
}

.vat-history-body {
    padding: 20px;
}

.vat-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.vat-history-item {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.vat-history-item:hover {
    background: #f7fafc;
}

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

.vat-history-content {
    margin-bottom: 8px;
}

.vat-history-description {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 4px;
}

.vat-history-words {
    font-size: 13px;
    color: #718096;
    margin-bottom: 6px;
}

.vat-history-date {
    font-size: 12px;
    color: #a0aec0;
}

.vat-history-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.vat-history-button {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.vat-history-button:hover {
    background: #edf2f7;
    color: #4a5568;
}

.vat-history-empty {
    text-align: center;
    padding: 30px;
    color: #a0aec0;
}

/* Секция для поделиться */
.vat-share-section {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.vat-share-section p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #4a5568;
    font-weight: 500;
}

.vat-share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.vat-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #f7fafc;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 20px;
}

.vat-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.vat-share-whatsapp:hover {
    background: #25D366;
    color: white !important;
}

.vat-share-telegram:hover {
    background: #0088cc;
    color: white !important;
}

.vat-share-vk:hover {
    background: #4a76a8;
    color: white !important;
}

.vat-share-copy:hover {
    background: #38b2ac;
    color: white !important;
}

.vat-share-url {
    margin-top: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.vat-share-url input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    text-align: center;
    cursor: pointer;
}

.vat-share-url input:focus {
    outline: none;
    border-color: #38b2ac;
    box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
}

/* Анимации */
@keyframes vat-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.vat-animate-fade-in {
    animation: vat-fadeIn 0.3s ease-out forwards;
}

@keyframes vat-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.vat-copy-success {
    color: #38b2ac;
    animation: vat-pulse 0.5s;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .vat-calculator-container {
        padding: 0 10px;
    }
    
    .vat-header h1 {
        font-size: 26px;
    }
    
    .vat-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vat-calculator-body {
        padding: 20px;
    }
    
    .vat-tab-group {
        flex-direction: column;
        max-width: 100%;
    }
    
    .vat-tab-button {
        padding: 12px;
    }
    
    .vat-result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .vat-result-value {
        font-size: 16px;
    }
    
    .vat-result-total .vat-result-value {
        font-size: 18px;
    }
    
    .vat-history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .vat-history-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .vat-share-buttons {
        gap: 10px;
    }
    
    .vat-share-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .vat-header h1 {
        font-size: 22px;
    }
    
    .vat-calculator-header h2 {
        font-size: 19px;
    }
    
    .vat-calculator-body {
        padding: 15px;
    }
    
    .vat-input, .vat-select {
        padding: 12px 14px;
    }
    
    .vat-button {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .vat-result-card {
        padding: 15px;
    }
    
    .vat-share-section {
        padding: 15px;
    }
    
    .vat-share-buttons {
        gap: 8px;
    }
    
    .vat-share-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}