/* Custom styles for PropSpectra */

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer,
    .breadcrumb {
        display: none !important;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }

    .analysis-content {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* Analysis content styling */
.analysis-content {
    line-height: 1.6;
    font-size: 14px;
}

.analysis-content p {
    margin-bottom: 1rem;
}

/* Progress bars */
.progress {
    height: 8px;
}

/* Score display improvements */
.display-4 {
    font-weight: 700;
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

/* Table improvements */
.table th {
    font-weight: 600;
    border-top: none;
    font-size: 14px;
}

.table td {
    vertical-align: middle;
    font-size: 14px;
}

/* Badge improvements */
.badge {
    font-size: 11px;
    padding: 0.4em 0.6em;
}

/* Button improvements */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Form improvements */
.form-control {
    border-radius: 6px;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/*Navbar improvements */
.navbar-brand {
    font-weight: 600;
    font-size: 1.2rem;
}

/* Hero section */
.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
}

/* Feature cards */
.card.border-0 {
    transition: all 0.3s ease;
}

.card.border-0:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* Census Data Styles */
.census-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.census-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.census-card h4 {
    color: #495057;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.metric:last-child {
    border-bottom: none;
}

.metric .label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
}

.metric .value {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.insight-box {
    background: #e8f4fd;
    border: 1px solid #b3d9f7;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.insight-box h4 {
    color: #0c63e4;
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
}

.insight-box p {
    color: #495057;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.data-source {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.data-source small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.8rem;
    }

    .display-6 {
        font-size: 1.5rem;
    }

    .table-responsive {
        font-size: 13px;
    }
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Status badges */
.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Image carousel improvements */
.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 16px 16px;
}

/* Profile image in navbar */
.navbar .rounded-circle {
    border: 2px solid rgba(255,255,255,0.2);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Body layout improvements */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Global text readability improvements */
.text-muted {
    color: #6c757d !important; /* Darker muted text for better readability on white backgrounds */
}

/* Ensure good contrast on white/light backgrounds */
.lead.text-muted {
    color: #5a6268 !important; /* Even darker for lead text */
}

small.text-muted {
    color: #6c757d !important; /* Consistent darker muted for small text */
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

/* Deal Analysis Section Custom Styling */
.card.border-warning {
    border: 1px solid #e8b347 !important;
    box-shadow: 0 4px 12px rgba(232, 179, 71, 0.15);
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    border-bottom: 1px solid #d68910;
    color: white !important;
}

.card-header.bg-warning h5 {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Wholesale Deal Analysis - Enhanced Green */
.bg-success.text-white {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    border: none;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.text-success.fw-bold {
    color: #27ae60 !important;
}

/* 70% Rule Analysis - Enhanced Blue */
.bg-primary.text-white {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    border: none;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Analysis Cards Styling */
.card.bg-light {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    color: #212529 !important; /* Darker text for better contrast */
}

.card.bg-light:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.card.bg-light .card-header {
    background: white !important;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
}

.card.bg-light .card-header h6 {
    font-weight: 600;
    margin: 0;
    color: #495057 !important; /* Darker header text */
}

.card.bg-light .card-body {
    color: #212529 !important; /* Ensure body text is dark */
}

.card.bg-light strong {
    color: #343a40 !important; /* Very dark for emphasis */
}

.card.bg-light .text-muted {
    color: #6c757d !important; /* Darker muted text for better readability */
}

/* Text color improvements - moved to Deal Verdict section below */

/* Button and interactive elements in deal analysis */
.p-2.rounded.text-center {
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.p-2.rounded.text-center:hover {
    transform: translateY(-1px);
}

/* Deal Verdict & Next Steps Section Custom Styling */
.card.border-success {
    border: 1px solid #28a745 !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border-bottom: 1px solid #1e7e34;
    color: white !important;
}

.card-header.bg-success h5 {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Enhanced success text styling */
h6.text-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Next Actions card styling */
.col-md-4 .card.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    color: #212529 !important; /* Ensure dark text in Next Actions cards */
}

.col-md-4 .card.bg-light .card-body {
    color: #212529 !important; /* Dark text for card body content */
}

.col-md-4 .card.bg-light ol li {
    color: #343a40 !important; /* Dark text for list items */
}

.col-md-4 .card.bg-light .card-header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    color: white !important;
    border-bottom: 1px solid #5a6268;
}

.col-md-4 .card.bg-light .card-header h6 {
    color: white !important;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Example URLs and Addresses Section Custom Styling - Properly scoped */
.card.example-urls-card {
    background: linear-gradient(135deg, #6f42c1 0%, #6610f2 100%) !important;
    border: 1px solid #6f42c1;
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.15);
    color: white !important;
}

.card.example-urls-card .card-body {
    background: transparent;
}

.card.example-urls-card .card-title {
    color: white !important;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card.example-urls-card strong {
    color: #e0cffc !important;
    font-weight: 600;
}

.card.example-urls-card .text-muted {
    color: rgba(255, 255, 255, 0.85) !important;
}

.card.example-urls-card ul li {
    margin-bottom: 0.25rem;
}

/* Flip Percentage Buttons */
.flip-percentage-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.flip-percentage-btn:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

.flip-percentage-btn.active {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: white;
    color: #198754 !important;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Novation & Flip Section Custom Styling */
#novation-view .card.border-info {
    border: 1px solid #0dcaf0 !important;
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.15);
}

#novation-view .card-header.bg-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%) !important;
    border-bottom: 1px solid #0aa2c0;
    color: white !important;
}

#novation-view .card-header.bg-info h6 {
    color: white !important;
    font-weight: 600;
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#novation-view .card-header.bg-info small {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Novation MAO Display */
#novation-view .p-2.bg-info.text-white {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%) !important;
    border: none;
    box-shadow: 0 2px 8px rgba(13, 202, 240, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Novation Fee Text */
#novation-view .text-info {
    color: #0aa2c0 !important;
    font-weight: 600;
}

/* Novation Discount Slider Styling */
#novation-discount-slider {
    accent-color: #0dcaf0;
}

#novation-discount-display {
    min-width: 50px;
    text-align: center;
}

/* Novation Toggle Button Styling */
.btn-outline-info:not(:disabled):not(.disabled).active,
.btn-outline-info:not(:disabled):not(.disabled):active {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: white;
}

.btn-check:checked + .btn-outline-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: white;
}

/* Novation Strategy Alert */
#novation-view .alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 1px solid #0dcaf0;
    color: #0c5460;
}

#novation-view .alert-info strong {
    color: #0a6c7d;
}