/* Colorado Property Search Tool Styles */
:root {
    --primary-color: #0073aa;
    --primary-dark: #005a87;
    --primary-light: #e7f3ff;
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --text-tertiary: #888;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --background-light: #f8fafb;
    --error-color: #dc3545;
    --success-color: #28a745;
}

.colorado-property-search-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Main Title */
.cps-main-title {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    padding: 30px 30px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.15);
}

.cps-main-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 0.3px;
}

/* Header */
.cps-header {
    text-align: center;
    margin-bottom: 35px;
    padding: 25px 30px 20px;
    background: #ffffff;
}

.cps-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    letter-spacing: -0.3px;
}

.cps-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Search Form */
.cps-search-form {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.cps-search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 115, 170, 0.1);
}

.cps-form-group {
    margin-bottom: 24px;
}

.cps-form-group:last-of-type {
    margin-bottom: 0;
}

.cps-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 16px;
    letter-spacing: 0.2px;
}

@media (max-width: 768px) {
    .cps-form-group label {
        font-size: 17px;
    }
}

.required {
    color: #dc3545;
    font-weight: bold;
}

.cps-form-group select,
.cps-form-group input {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: var(--text-primary);
    background: #ffffff;
}

.cps-form-group select:hover,
.cps-form-group input:hover {
    border-color: #c0c0c0;
}

.cps-form-group select:focus,
.cps-form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    background: #fafbfc;
}

/* Search Button */
.cps-search-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
    letter-spacing: 0.3px;
    min-height: 48px;
}

.cps-search-btn:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(0, 115, 170, 0.3);
    transform: translateY(-2px);
}

.cps-search-btn:active:not(:disabled) {
    transform: translateY(0);
}

.cps-search-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: linear-gradient(135deg, #90c0d8 0%, #7aafca 100%);
    color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(144, 192, 216, 0.2);
}

.cps-search-btn.loading {
    pointer-events: none;
}

.cps-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

.cps-search-btn.loading .cps-spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Search Help */
.cps-search-help {
    margin-top: 24px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(0, 115, 170, 0.03) 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    animation: slideInUp 0.4s ease;
}

.cps-search-help p {
    margin: 0;
    color: var(--primary-color);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results Container */
.cps-results-container {
    margin-bottom: 30px;
}

.cps-result-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.cps-result-item:hover {
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.12);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cps-result-header {
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.cps-result-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 8px 0;
    letter-spacing: -0.2px;
}

.cps-result-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.cps-result-section {
    margin-bottom: 20px;
}

.cps-result-section:last-child {
    margin-bottom: 0;
}

.cps-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
}

.cps-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .cps-field-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.cps-field {
    padding: 0;
}

.cps-field.full-width {
    grid-column: 1 / -1;
}

.cps-field-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 7px 0;
    display: block;
}

.cps-field-value {
    font-size: 15px;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.6;
    font-weight: 500;
}

.cps-field-value.empty {
    color: #999;
    font-style: italic;
}

/* Error Message */
.cps-error-message {
    background: linear-gradient(135deg, #fee 0%, #fef0f0 100%);
    border: 1.5px solid #fcc;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 20px;
    color: #c33;
    text-align: center;
    font-weight: 500;
    animation: slideInDown 0.4s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Results */
.cps-no-results {
    text-align: center;
    padding: 50px 30px;
    color: var(--text-secondary);
    background: var(--background-light);
    border-radius: 8px;
}

.cps-no-results-icon {
    font-size: 56px;
    margin-bottom: 18px;
    opacity: 0.7;
}

.cps-no-results-text {
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.cps-no-results-hint {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

/* Loading State */
.cps-loading {
    text-align: center;
    padding: 50px 30px;
}

.cps-loading-spinner {
    display: inline-block;
    width: 44px;
    height: 44px;
    border: 4px solid var(--border-light);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
    margin-bottom: 18px;
}

.cps-loading-text {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Water Glass Loading Animation */
.cps-water-glass {
    margin-top: 40px;
    animation: fadeIn 0.5s ease;
}

.cps-glass-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.cps-glass {
    width: 60px;
    height: 100px;
    border: 3px solid var(--primary-color);
    border-radius: 0 0 12px 12px;
    background: linear-gradient(90deg, rgba(0, 115, 170, 0.05) 0%, rgba(0, 115, 170, 0.02) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0, 115, 170, 0.1);
}

.cps-water {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #0073aa 0%, #005a87 100%);
    animation: fillWater 3s ease-in-out infinite;
    border-radius: 0 0 9px 9px;
}

@keyframes fillWater {
    0% {
        height: 0%;
    }
    50% {
        height: 100%;
    }
    100% {
        height: 0%;
    }
}

.cps-water-droplets {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 40px;
}

.cps-droplet {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #0073aa;
    border-radius: 50%;
    left: 50%;
    opacity: 0.8;
}

.cps-droplet:nth-child(1) {
    animation: dropFall 1s ease-in infinite;
}

.cps-droplet:nth-child(2) {
    animation: dropFall 1s ease-in 0.3s infinite;
}

.cps-droplet:nth-child(3) {
    animation: dropFall 1s ease-in 0.6s infinite;
}

@keyframes dropFall {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
}

.cps-water-text {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
    margin: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .colorado-property-search-container {
        margin: 15px;
        padding: 0;
    }

    .cps-main-title {
        padding: 24px 20px;
        border-radius: 10px 10px 0 0;
    }

    .cps-main-title h1 {
        font-size: 24px;
    }

    .cps-header {
        padding: 20px 20px 15px;
    }

    .cps-header h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .cps-subtitle {
        font-size: 15px;
    }

    .cps-search-form {
        padding: 24px 20px;
        border-radius: 10px;
    }

    .cps-form-group {
        margin-bottom: 20px;
    }

    .cps-form-group label {
        font-size: 17px;
        margin-bottom: 10px;
    }

    .cps-form-group select,
    .cps-form-group input {
        padding: 14px 16px;
        font-size: 16px;
        min-height: 44px;
    }

    .cps-search-btn {
        padding: 16px 32px;
        font-size: 17px;
        min-height: 52px;
    }

    .cps-search-help {
        margin-top: 20px;
        padding: 14px 16px;
    }

    .cps-result-item {
        padding: 20px;
        border-radius: 10px;
    }

    .cps-result-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .cps-result-title {
        font-size: 17px;
        margin-bottom: 6px;
    }

    .cps-section-title {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .cps-field-row {
        gap: 16px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .cps-main-title h1 {
        font-size: 20px;
    }

    .cps-header h2 {
        font-size: 19px;
    }

    .cps-subtitle {
        font-size: 14px;
    }

    .cps-search-form {
        padding: 20px 16px;
    }

    .cps-form-group label {
        font-size: 16px;
    }

    .cps-result-item {
        padding: 16px;
    }
}

/* Utility Classes */
.cps-highlight {
    background: #ffd54f;
    padding: 2px 4px;
    border-radius: 2px;
}

.cps-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
}

.cps-badge-primary {
    background: #e7f3ff;
    color: #0073aa;
}

.cps-badge-success {
    background: #e6f7e6;
    color: #2e7d32;
}
