/**
 * Property Pulse Frontend Styles
 * Professional, minimal, investor-grade design
 */

/* ========================================
   Main Calculator Container
   ======================================== */
.property-pulse-calculator {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.pp-calculator-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 0.75rem;
}

/* ========================================
   Form Sections
   ======================================== */
.pp-section {
    margin-bottom: 2rem;
}

.pp-section-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3338;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f1;
}

/* ========================================
   Form Layout
   ======================================== */
.pp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pp-form-group {
    display: flex;
    flex-direction: column;
}

.pp-form-group.pp-full-width {
    grid-column: 1 / -1;
}

.pp-form-group label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3338;
}

/* ========================================
   Inputs
   ======================================== */
.pp-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pp-currency {
    position: absolute;
    left: 12px;
    font-weight: 600;
    color: #50575e;
    pointer-events: none;
}

.pp-form-group input[type="number"],
.pp-form-group select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: #ffffff;
}

.pp-input-wrapper input[type="number"] {
    padding-left: 2rem;
}

.pp-form-group input[type="number"]:focus,
.pp-form-group select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.pp-help-text {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #646970;
    font-style: italic;
}

/* ========================================
   Buttons
   ======================================== */
.pp-form-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f1;
}

.pp-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.pp-button-primary {
    background: #2271b1;
    color: #ffffff;
    width: 100%;
}

.pp-button-primary:hover {
    background: #135e96;
}

.pp-button-secondary {
    background: #f6f7f7;
    color: #2c3338;
    border: 1px solid #dcdcde;
}

.pp-button-secondary:hover {
    background: #e0e0e0;
}

/* ========================================
   Results Section
   ======================================== */
.pp-results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #2271b1;
}

.pp-results-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* ========================================
   Metrics Grid
   ======================================== */
.pp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.pp-metric-card {
    padding: 1.25rem;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    text-align: center;
}

.pp-metric-label {
    font-size: 0.85rem;
    color: #646970;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.pp-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.pp-metric-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    display: inline-block;
}

.pp-metric-status.positive {
    background: #d4edda;
    color: #155724;
}

.pp-metric-status.negative {
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   Chart Container
   ======================================== */
.pp-chart-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
}

.pp-chart-container canvas {
    max-height: 300px;
}

/* ========================================
   Breakdown Table
   ======================================== */
.pp-breakdown {
    margin: 2rem 0;
}

.pp-breakdown h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3338;
}

.pp-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.pp-breakdown-table tbody tr {
    border-bottom: 1px solid #f0f0f1;
}

.pp-breakdown-table tbody tr:last-child {
    border-bottom: none;
}

.pp-breakdown-table td {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.pp-breakdown-table td:first-child {
    color: #2c3338;
    font-weight: 500;
}

.pp-breakdown-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #1a1a1a;
}

.pp-breakdown-table tr.pp-total td {
    background: #f6f7f7;
    font-weight: 700;
    color: #1a1a1a;
}

/* ========================================
   Premium Notice
   ======================================== */
.pp-premium-notice {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f6f7f7 0%, #ffffff 100%);
    border: 2px solid #2271b1;
    border-radius: 6px;
}

.pp-premium-notice h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
    color: #2271b1;
}

.pp-premium-notice p {
    margin: 0 0 0.75rem 0;
    color: #2c3338;
}

.pp-premium-notice ul {
    margin: 0 0 1rem 1.5rem;
    padding: 0;
}

.pp-premium-notice li {
    margin-bottom: 0.5rem;
    color: #2c3338;
}

/* ========================================
   Loading State
   ======================================== */
.pp-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.pp-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f1;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: pp-spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes pp-spin {
    to { transform: rotate(360deg); }
}

.pp-loading p {
    margin: 0;
    color: #646970;
    font-size: 0.95rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .property-pulse-calculator {
        padding: 1.5rem 1rem;
    }
    
    .pp-form-row {
        grid-template-columns: 1fr;
    }
    
    .pp-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .pp-calculator-title {
        font-size: 1.5rem;
    }
    
    .pp-metric-value {
        font-size: 1.5rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.pp-text-success {
    color: #00a32a;
}

.pp-text-danger {
    color: #d63638;
}

.pp-text-warning {
    color: #dba617;
}

.pp-text-muted {
    color: #646970;
}
