/* plugins/property-calculator/property-calculator.css */

.property-calculator-target-container {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.prop-calc-container {
    background: linear-gradient(160deg, #0d1f3c 0%, #0a192f 50%, #081629 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 1.5rem;
    color: #cbd5e1;
    font-family: 'Inter', sans-serif;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Strip outer border, background and padding when rendered inside a modal */
.fixed .prop-calc-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

.fixed .prop-calc-container::before {
    display: none !important;
}

@media (min-width: 768px) {
    .prop-calc-container {
        padding: 2rem;
    }
}

.prop-calc-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.prop-calc-title {
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.prop-calc-subtitle {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

/* Tabs */
.prop-calc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.prop-calc-tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.prop-calc-tab-btn:hover {
    color: #cbd5e1;
}

.prop-calc-tab-btn.active {
    color: #ffffff;
    border-bottom-color: #d4af37;
}

/* Sub-tabs */
.prop-calc-sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.prop-calc-sub-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prop-calc-sub-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.prop-calc-sub-btn.active {
    background-color: #d4af37;
    color: #0a192f;
    border-color: #d4af37;
    font-weight: 700;
}

/* Layout Grid */
.prop-calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .prop-calc-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 3rem;
    }
    .prop-calc-results-panel {
        position: sticky;
        top: 2rem;
        height: fit-content;
    }
}

/* Form inputs */
.prop-calc-form-group {
    margin-bottom: 1.25rem;
}

.prop-calc-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.prop-calc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.prop-calc-input-prefix {
    position: absolute;
    left: 1rem;
    color: #64748b;
    font-size: 0.875rem;
}

.prop-calc-input {
    width: 100%;
    background-color: rgba(5, 12, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.prop-calc-input-prefix + .prop-calc-input {
    padding-left: 2.25rem;
}

.prop-calc-input:focus {
    border-color: #d4af37;
}

/* Select */
.prop-calc-select {
    width: 100%;
    background-color: rgba(5, 12, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
}

.prop-calc-select:focus {
    border-color: #d4af37;
}

/* Sliders */
.prop-calc-slider-group {
    margin-bottom: 1.5rem;
}

.prop-calc-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.prop-calc-slider-value {
    color: #d4af37;
    font-weight: 700;
    font-size: 0.875rem;
}

.prop-calc-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.prop-calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d4af37;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    transition: transform 0.2s ease;
}

.prop-calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Checkbox */
.prop-calc-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.prop-calc-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #d4af37;
    cursor: pointer;
}

.prop-calc-checkbox-label {
    font-size: 0.875rem;
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
}

/* Results panel */
.prop-calc-results-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: fit-content;
}

.prop-calc-results-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #64748b;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-pb: 0.5rem;
}

.prop-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
}

.prop-calc-row:last-child {
    border-bottom: none;
}

.prop-calc-row-label {
    color: #94a3b8;
}

.prop-calc-row-value {
    color: #ffffff;
    font-family: monospace;
    font-weight: 700;
}

.prop-calc-total-row {
    background-color: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prop-calc-total-label {
    color: #d4af37;
    font-weight: 700;
}

.prop-calc-total-value {
    color: #d4af37;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: monospace;
}

/* Notes / Exemption notes */
.prop-calc-note {
    margin-top: 1rem;
    background-color: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
}

.prop-calc-warning {
    margin-top: 1rem;
    background-color: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
}

.prop-calc-disclaimer {
    font-size: 0.65rem;
    color: #475569;
    margin-top: 1rem;
    line-height: 1.4;
}

/* Buttons */
.prop-calc-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.prop-calc-btn {
    width: 100%;
    padding: 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    text-decoration: none;
}

.prop-calc-btn-print {
    background-color: #334155;
    color: #ffffff;
}

.prop-calc-btn-print:hover {
    background-color: #475569;
}

.prop-calc-btn-wa {
    background-color: #16a34a;
    color: #ffffff;
}

.prop-calc-btn-wa:hover {
    background-color: #15803d;
}

/* Print utility styles */
@media print {
    .prop-calc-tabs, .prop-calc-sub-tabs, .prop-calc-buttons, .prop-calc-disclaimer, .prop-calc-label, .prop-calc-input-wrapper, .prop-calc-slider-group, .prop-calc-checkbox-group {
        display: none !important;
    }
    .prop-calc-container {
        background: #ffffff !important;
        color: #000000 !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .prop-calc-grid {
        grid-template-columns: 1fr !important;
    }
    .prop-calc-results-card {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        color: #000000 !important;
    }
    .prop-calc-row {
        border-bottom: 1px solid #e2e8f0 !important;
    }
    .prop-calc-row-label {
        color: #475569 !important;
    }
    .prop-calc-row-value {
        color: #000000 !important;
    }
    .prop-calc-total-row {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
    }
    .prop-calc-total-label, .prop-calc-total-value {
        color: #000000 !important;
    }
}

@media (min-width: 768px) {
    .prop-calc-results-card {
        padding: 2rem !important;
    }
    .prop-calc-buttons {
        flex-direction: row !important;
    }
    .prop-calc-btn {
        flex: 1 !important;
    }
}
