/*--------------------------------------------------------------
# Yardstics Valuation Page Specific Styles
--------------------------------------------------------------*/

/* Scoping rules to the Valuation page using body class */
/* Assumes page slug 'valuation' */

/* --- General Page Structure & Title --- */

/* Remove theme's default H1 title if it exists and rely on our custom one */
.page-slug-valuation .entry-title {
    display: none;
}

/* Container for all custom content */
.page-slug-valuation .valuation-page-content {
    /* Uses global .ast-container max-width via parent */
    padding-bottom: 60px; /* Space at the very bottom */
    margin-top: 50px; /* *** ADDED: Space below header *** */
}

/* *** ADDED: Style for the custom H1 *** */
.page-slug-valuation .page-main-heading {
    text-align: center;
    font-size: 38px; /* Adjust size as needed */
    font-weight: 600;
    color: #333;
    margin-bottom: 30px; /* Space below H1 */
}
.page-slug-valuation .page-main-heading sup {
    font-size: 0.5em; /* Make TM smaller */
    top: -1em; /* Adjust vertical position */
    position: relative;
}

/* --- Intro Section --- */
.page-slug-valuation .valuation-intro {
    max-width: 800px;
    margin: 0 auto 40px auto;
    text-align: center;
}

.page-slug-valuation .valuation-intro p {
    font-size: 18px;
    line-height: 1.7;
    color: #555;
}

/* --- Instructions Section --- */
.page-slug-valuation .valuation-instructions {
    max-width: 850px;
    margin: 0 auto 50px auto;
    padding: 30px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.page-slug-valuation .valuation-instructions h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 28px;
    text-align: center;
}

.page-slug-valuation .valuation-instructions ol {
    margin: 0 auto 20px auto;
    padding-left: 40px;
    max-width: 650px;
    text-align: left;
}

.page-slug-valuation .valuation-instructions li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.page-slug-valuation .valuation-instructions .token-cost,
.page-slug-valuation .valuation-instructions .disclaimer,
.page-slug-valuation .valuation-instructions .supported-sources {
    font-size: 14px;
    line-height: 1.6;
    max-width: 700px;
    margin: 15px auto 0 auto;
    text-align: center;
    color: #555;
}

.page-slug-valuation .valuation-instructions .token-cost strong,
.page-slug-valuation .valuation-instructions .disclaimer strong {
    color: #333;
}

.page-slug-valuation .valuation-instructions .disclaimer {
    font-style: italic;
    color: #6c757d;
}
.page-slug-valuation .valuation-instructions .supported-sources {
    font-size: 13px;
    color: #6c757d;
}


/* --- Valuation Tool Section --- */
.page-slug-valuation .valuation-tool {
    max-width: 750px;
    margin: 0 auto;
    padding-top: 20px;
}

.page-slug-valuation .valuation-tool h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 600;
    color: #333;
}

/* Input Area Styling */
.page-slug-valuation .valuation-input-area {
    margin-bottom: 20px;
}

.page-slug-valuation .valuation-input-area label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
    color: #444;
    text-align: left;
}

.page-slug-valuation .input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-slug-valuation #property-input {
    flex-grow: 1;
    padding: 14px 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-height: 50px;
    font-size: 16px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.page-slug-valuation #property-input:focus {
    border-color: #0099ff;
    box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.2);
    outline: none;
}

.page-slug-valuation #fetch-button {
    flex-shrink: 0;
    padding: 14px 25px;
    line-height: normal;
    height: 50px;
    box-sizing: border-box;
}

/* --- Input Type Indicators - MODIFIED --- */
.page-slug-valuation .input-indicators {
    margin-top: 12px; /* Increased space slightly */
    display: flex;
    gap: 15px;
    min-height: 24px;
    align-items: center;
}

.page-slug-valuation .indicator {
    /* Base appearance (applied even when hidden by display:none initially) */
    display: none; /* *** Hide by default *** */
    padding: 5px 12px; /* Slightly larger padding */
    border-radius: 12px; /* Pill shape */
    font-size: 12px;
    font-weight: 600; /* Bolder */
    color: #6c757d; /* Default text color (will change when active) */
    background-color: #e9ecef; /* Default background (will change when active) */
    line-height: 1;
    transition: background-color 0.3s ease, color 0.3s ease; /* Keep transitions */
}

.page-slug-valuation .indicator.active {
    display: inline-block; /* *** Show when active class is added by JS *** */
    color: white; /* White text when active */
}

.page-slug-valuation .url-indicator.active {
    background-color: #007bff; /* Blue for URL */
}

.page-slug-valuation .mls-indicator.active {
    background-color: #28a745; /* Green for MLS */
}
/* --- End Input Type Indicators --- */


/* --- Loading State --- */
.page-slug-valuation .loading-state {
    text-align: center;
    padding: 40px 20px;
    margin-top: 20px;
    color: #555;
}

.page-slug-valuation .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 153, 255, 0.2);
    border-radius: 50%;
    border-top-color: #0099ff;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

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


/* --- Confirmation Area --- */
.page-slug-valuation .confirmation-area {
    margin-top: 30px;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-slug-valuation .confirmation-area h4 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.page-slug-valuation #confirmation-content {
    text-align: center;
    margin-bottom: 30px;
    min-height: 100px;
}

.page-slug-valuation .confirmation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-slug-valuation #confirm-valuation-button .token-info {
    display: block;
    font-size: 12px;
    font-weight: normal;
    margin-top: 2px;
    opacity: 0.9;
}

.page-slug-valuation #back-button {
    color: #6c757d;
    border-color: #6c757d;
}
.page-slug-valuation #back-button:hover {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}


/* --- Result Area --- */
.page-slug-valuation .result-area {
    margin-top: 30px;
    padding: 30px;
    border: 1px solid #c3e6cb;
    background-color: #d4edda;
    border-radius: 8px;
    text-align: center;
}
.page-slug-valuation .result-area h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #155724;
    font-size: 20px;
}
.page-slug-valuation #result-content {
    font-size: 28px;
    font-weight: bold;
    color: #155724;
}

/* --- Error Message Area --- */
.page-slug-valuation .error-message {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #f5c6cb;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
}


/* --- Responsive Adjustments --- */

@media (max-width: 768px) { /* Mobile */
     .page-slug-valuation .page-main-heading {
        font-size: 30px; /* Adjust H1 size */
        margin-top: 30px; /* Adjust top margin */
    }
    .page-slug-valuation .valuation-intro p {
        font-size: 16px;
    }
    .page-slug-valuation .valuation-instructions {
        padding: 20px;
    }
    .page-slug-valuation .valuation-instructions h2 {
        font-size: 24px;
    }
    .page-slug-valuation .valuation-instructions li {
        font-size: 15px;
    }
    .page-slug-valuation .valuation-instructions .token-cost,
    .page-slug-valuation .valuation-instructions .disclaimer,
    .page-slug-valuation .valuation-instructions .supported-sources {
        font-size: 13px;
    }
    .page-slug-valuation .input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .page-slug-valuation #fetch-button {
        width: 100%;
        padding: 14px 20px;
    }
    .page-slug-valuation .input-indicators {
        justify-content: center;
    }
    .page-slug-valuation .confirmation-actions {
       gap: 10px;
    }
    .page-slug-valuation .confirmation-actions button {
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    .page-slug-valuation #result-content {
        font-size: 24px;
    }
}

@media (max-width: 480px) { /* Smaller Mobile */
    .page-slug-valuation .page-main-heading {
        font-size: 26px; /* Further adjust H1 */
    }
    .page-slug-valuation .valuation-instructions h2 {
        font-size: 22px;
    }
    .page-slug-valuation .valuation-tool h3 {
        font-size: 20px;
    }
}

.page-slug-valuation #confirmation-content {
    text-align: left; /* Align text left within the box */
    margin-bottom: 30px;
    min-height: 100px; /* Keep minimum height */
}

.page-slug-valuation .property-details {
    display: flex;
    gap: 25px; /* Space between image and text */
    align-items: flex-start; /* Align items to the top */
}

.page-slug-valuation .property-image {
    flex: 0 0 250px; /* Fixed width for image container, don't grow or shrink */
    max-width: 250px;
}

.page-slug-valuation .property-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px; /* Rounded corners for image */
    border: 1px solid #eee;
}

.page-slug-valuation .property-info {
    flex: 1; /* Allow text info to take remaining space */
    min-width: 0; /* Prevent flex item overflow */
}

.page-slug-valuation .property-info p {
    margin: 0 0 10px 0; /* Space between info lines */
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}
.page-slug-valuation .property-info p:last-child {
    margin-bottom: 0;
}

.page-slug-valuation .property-info strong {
    color: #111; /* Slightly darker label */
    margin-right: 5px;
}

/* --- ADDED: Responsive for Confirmation Content --- */
@media (max-width: 768px) {
    .page-slug-valuation .property-details {
        flex-direction: column; /* Stack image and text */
        align-items: center; /* Center items when stacked */
        gap: 20px;
    }
    .page-slug-valuation .property-image {
        flex-basis: auto; /* Reset flex basis */
        width: 100%; /* Allow image container to be wider */
        max-width: 350px; /* But limit max width */
    }
     .page-slug-valuation .property-info {
        width: 100%; /* Take full width */
        text-align: center; /* Center text */
    }
    .page-slug-valuation .property-info p {
        font-size: 15px;
    }
}