/**
 * Stamp Duty Calculator Public Styles
 */

/* Base styles */
.sdc-calculator {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    box-sizing: border-box;
}

/* Typography */
.sdc-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e2438;
    margin: 0 0 1.5rem;
    text-align: center;
}

.sdc-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* Form elements */
.sdc-form {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sdc-form-group {
    margin-bottom: 1rem;
}

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

.sdc-currency-symbol {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4a5568;
    font-weight: 500;
}

.sdc-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
}

.sdc-input:focus {
    outline: none;
    border-color: var(--sdc-primary-color, #1e73be);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

.sdc-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' 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 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.sdc-select:focus {
    outline: none;
    border-color: var(--sdc-primary-color, #1e73be);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

/* Checkbox styles */
.sdc-checkbox-group {
    display: flex;
    align-items: center;
}

.sdc-checkbox {
    margin-right: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    appearance: none;
    background-color: #fff;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    position: relative;
    cursor: pointer;
}

.sdc-checkbox:checked {
    background-color: var(--sdc-primary-color, #1e73be);
    border-color: var(--sdc-primary-color, #1e73be);
}

.sdc-checkbox:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(45deg);
    width: 0.25rem;
    height: 0.5rem;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.sdc-checkbox-label {
    font-weight: 400;
    cursor: pointer;
}

/* Results section */
.sdc-results {
    background-color: #f8fafc;
    border-radius: 4px;
    padding: 1.5rem;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.sdc-results.has-results {
    background-color: #ebf8ff;
    border-left: 4px solid var(--sdc-primary-color, #1e73be);
}

.sdc-results-heading {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 1rem;
}

.sdc-result-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sdc-primary-color, #1e73be);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.sdc-effective-rate {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 1rem;
}

/* Breakdown section */
.sdc-breakdown {
    margin-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.sdc-breakdown-heading {
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 1rem;
}

.sdc-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.sdc-breakdown-table th,
.sdc-breakdown-table td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.sdc-breakdown-table th:first-child,
.sdc-breakdown-table td:first-child {
    text-align: left;
}

.sdc-breakdown-table th {
    font-weight: 600;
    color: #4a5568;
    background-color: #f7fafc;
}

/* Info section */
.sdc-info {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #718096;
}

.sdc-disclaimer {
    margin: 0;
    font-style: italic;
}

/* Themes */
.sdc-theme-light {
    background-color: #fff;
    --sdc-primary-color: #3b82f6;
}

.sdc-theme-dark {
    background-color: #1e2438;
    color: #e2e8f0;
    --sdc-primary-color: #60a5fa;
}

.sdc-theme-dark .sdc-title {
    color: #f8fafc;
}

.sdc-theme-dark .sdc-label {
    color: #cbd5e1;
}

.sdc-theme-dark .sdc-input,
.sdc-theme-dark .sdc-select {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

.sdc-theme-dark .sdc-results {
    background-color: #2d3748;
}

.sdc-theme-dark .sdc-results.has-results {
    background-color: #1e3a8a;
    border-left-color: #60a5fa;
}

.sdc-theme-dark .sdc-results-heading {
    color: #f8fafc;
}

.sdc-theme-dark .sdc-breakdown-table th {
    background-color: #2d3748;
    color: #e2e8f0;
}

.sdc-theme-dark .sdc-breakdown-table th,
.sdc-theme-dark .sdc-breakdown-table td {
    border-bottom-color: #4a5568;
}

/* Responsive styles */
@media (max-width: 768px) {
    .sdc-calculator {
        padding: 1.5rem;
    }
    
    .sdc-title {
        font-size: 1.5rem;
    }
    
    .sdc-result-amount {
        font-size: 2rem;
    }
    
    .sdc-breakdown-table {
        font-size: 0.75rem;
    }
}

/* Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 115, 190, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(30, 115, 190, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 115, 190, 0);
    }
}

.sdc-result-amount.updated {
    animation: pulse 1s;
}

/* Accessibility */
.sdc-input:focus,
.sdc-select:focus,
.sdc-checkbox:focus {
    outline: 2px solid var(--sdc-primary-color, #1e73be);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .sdc-calculator {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}