/* UK Stamp Duty Calculator Styles */
/* Modern, clean design with UK government-inspired color palette */

:root {
    --primary: #1d70b8;
    --primary-dark: #003078;
    --secondary: #28a745;
    --accent: #f47738;
    --warning: #d4351c;
    --background: #f3f2f1;
    --surface: #ffffff;
    --text: #0b0c0c;
    --text-secondary: #505a5f;
    --border: #b1b4b6;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --max-width: 900px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: var(--primary);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 10px;
}

/* Main Card */
.calculator-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.calculator-card h2 {
    color: var(--primary-dark);
    margin-bottom: 25px;
    font-size: 1.4rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

label .hint {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input[type="number"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1.1rem;
    transition: border-color 0.2s;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-option {
    flex: 1;
    min-width: 200px;
}

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

.radio-option label {
    display: block;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-weight: 500;
}

.radio-option label:hover {
    border-color: var(--primary);
}

.radio-option input[type="radio"]:checked + label {
    border-color: var(--primary);
    background: rgba(29, 112, 184, 0.1);
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: #218838;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--primary-dark);
}

/* Results Section */
.results-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
    display: none;
}

.results-section.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.total-tax {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 25px;
}

.total-tax .label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-tax .amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 10px 0;
}

.total-tax .rate {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Breakdown Table */
.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.breakdown-table th,
.breakdown-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.breakdown-table th {
    background: var(--background);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.breakdown-table td {
    font-size: 1rem;
}

.breakdown-table .band {
    font-weight: 500;
}

.breakdown-table .rate {
    color: var(--text-secondary);
}

.breakdown-table .tax {
    font-weight: 600;
    color: var(--primary-dark);
}

/* Info Boxes */
.info-box {
    background: rgba(29, 112, 184, 0.1);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.info-box h3 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-box p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.warning-box {
    background: rgba(212, 53, 28, 0.1);
    border-left-color: var(--warning);
}

.warning-box h3 {
    color: var(--warning);
}

/* Quick Links */
.quick-links {
    margin-top: 30px;
}

.quick-links h3 {
    color: var(--text);
    margin-bottom: 15px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.link-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.link-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.link-card h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

.link-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

footer h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

footer a:hover {
    color: white;
}

footer .copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.6rem;
    }
    
    .calculator-card {
        padding: 20px;
    }
    
    .total-tax .amount {
        font-size: 2.2rem;
    }
    
    .radio-option {
        min-width: 100%;
    }
    
    .breakdown-table {
        font-size: 0.9rem;
    }
    
    .breakdown-table th,
    .breakdown-table td {
        padding: 10px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
