/* Compare Properties Styles */

/* Hero Section */
.compare-hero {
    background: linear-gradient(135deg, #002e6e 0%, #1a5490 100%);
    color: #fff;
    padding: 80px 0 40px;
    margin-top: 75px;
    text-align: center;
}

.compare-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.compare-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Compare Section */
.compare-section {
    padding: 60px 0;
    background: #fafafa;
}

.compare-picker-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 46, 110, 0.08);
    margin-bottom: 28px;
    padding: 24px;
}

.compare-picker-in-table {
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
    box-shadow: none;
    margin-bottom: 0;
}

.compare-step-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.compare-step-head h2 {
    color: #1f2937;
    font-size: 1.35rem;
    margin: 4px 0 0;
}

.compare-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.compare-picker-field {
    display: grid;
    gap: 8px;
}

.compare-picker-field span {
    color: #002e6e;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.compare-picker-field select {
    background: #fff;
    border: 2px solid #d8e0ea;
    border-radius: 6px;
    color: #1f2937;
    font: inherit;
    font-weight: 600;
    min-height: 46px;
    padding: 0 12px;
}

.compare-picker-field select:focus {
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15);
    outline: none;
}

.compare-picker-field select:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.compare-picker-status {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 16px;
    padding: 12px 14px;
}

.compare-property-picks {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 18px;
}

.compare-pick-card {
    background: #fff;
    border: 1px solid #dde7f2;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.compare-pick-card img {
    aspect-ratio: 16 / 10;
    display: block;
    object-fit: cover;
    width: 100%;
}

.compare-pick-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.compare-pick-body > span {
    color: #f39c12;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.compare-pick-body h3 {
    color: #1f2937;
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.compare-pick-body p {
    color: #64748b;
    font-size: 0.82rem;
    margin: 0;
}

.compare-pick-body strong {
    color: #002e6e;
    font-size: 1rem;
}

.compare-pick-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.compare-pick-specs small {
    background: #eef4fb;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    padding: 5px 8px;
}

.compare-pick-body button {
    align-items: center;
    background: #002e6e;
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    justify-content: center;
    margin-top: 4px;
    padding: 10px 12px;
}

.compare-pick-body button:hover {
    background: #f39c12;
}

/* Compare Controls */
.compare-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-add-property,
.btn-reset-compare {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-add-property {
    background: #f39c12;
    color: #fff;
}

.btn-add-property:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.btn-add-property.disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-add-property.disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-reset-compare {
    background: #e74c3c;
    color: #fff;
}

.btn-reset-compare:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Compare Table Wrapper */
.compare-table-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

/* Compare Table */
.compare-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table thead {
    background: #002e6e;
    color: #fff;
}

.compare-table th {
    padding: 20px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.compare-table th.property-label {
    width: 20%;
    min-width: 150px;
}

.compare-table th.property-column {
    width: 26.67%;
    min-width: 250px;
    vertical-align: middle;
}

.property-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.property-select {
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-select:hover,
.property-select:focus {
    border-color: #f39c12;
    outline: none;
    box-shadow: 0 0 5px rgba(243, 156, 18, 0.2);
}

.btn-remove {
    padding: 8px 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-remove:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.btn-remove:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Table Body */
.compare-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.compare-table tbody tr:hover {
    background-color: #f8f9fa;
}

.compare-table td {
    padding: 20px 15px;
    vertical-align: middle;
}

.feature-label {
    background: #f8f9fa;
    font-weight: 600;
    color: #002e6e;
    width: 20%;
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-label i {
    color: #f39c12;
    font-size: 1rem;
}

.property-data {
    width: 26.67%;
    min-width: 250px;
    text-align: center;
    color: #444;
}

.compare-details-link {
    align-items: center;
    color: #002e6e;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    text-decoration: none;
}

.compare-details-link:hover {
    color: #f39c12;
}

/* Comparison Images */
.comparison-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

/* Highlight rows */
.highlight-price {
    background: #fff3cd;
    font-size: 1.2rem;
    font-weight: 700;
    color: #d39e00;
}

.highlight-area {
    background: #d1ecf1;
    font-weight: 600;
    color: #0c5460;
}

/* Comparison Actions */
.comparison-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: #002e6e;
    color: #fff;
}

.btn-primary:hover {
    background: #1a4d8f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 46, 110, 0.3);
}

.btn-secondary {
    background: #27ae60;
    color: #fff;
}

.btn-secondary:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
}

.empty-state p {
    color: #999;
    font-size: 1.1rem;
}

/* Toast Notification */
#toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: #fff;
    padding: 16px 24px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

#toast.show {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .compare-step-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .compare-picker-grid {
        grid-template-columns: 1fr;
    }

    .compare-hero h1 {
        font-size: 2rem;
    }

    .compare-table th.property-label,
    .feature-label {
        width: 30%;
        min-width: 100px;
    }

    .compare-table th.property-column,
    .property-data {
        width: 35%;
        min-width: 120px;
        padding: 12px 8px;
    }

    .property-select {
        font-size: 0.8rem;
        padding: 8px;
    }

    .compare-table th,
    .compare-table td {
        padding: 12px 8px;
    }

    .comparison-image {
        height: 120px;
    }

    .btn-add-property,
    .btn-reset-compare,
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .comparison-actions {
        flex-direction: column;
    }

    .comparison-actions .btn-primary,
    .comparison-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .compare-hero {
        padding: 50px 0 30px;
    }

    .compare-hero h1 {
        font-size: 1.5rem;
    }

    .compare-hero p {
        font-size: 0.95rem;
    }

    .compare-section {
        padding: 30px 0;
    }

    .compare-controls {
        flex-direction: column;
        gap: 10px;
    }

    .btn-add-property,
    .btn-reset-compare {
        width: 100%;
        justify-content: center;
    }
}

/* Download Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #002e6e;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #002e6e;
}

.modal-body {
    text-align: center;
}

.modal-body p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
}

.format-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.format-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Manrope", Arial, sans-serif;
}

.format-btn:hover {
    border-color: #f39c12;
    background: #fffbf0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.2);
}

.format-btn i {
    font-size: 2.5rem;
    color: #f39c12;
    margin-bottom: 10px;
}

.format-btn span {
    font-weight: 600;
    color: #002e6e;
    font-size: 1rem;
    margin-bottom: 5px;
    display: block;
}

.format-btn small {
    color: #999;
    font-size: 0.85rem;
    display: block;
}

.format-btn.downloading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive Modal */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .format-btn {
        padding: 15px;
    }

    .format-btn i {
        font-size: 2rem;
    }

    .format-btn span {
        font-size: 0.9rem;
    }
}
