/* GeoPDP Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Global Styles */
html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--warning-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), #004085) !important;
    min-height: 400px;
    display: flex;
    align-items: center;
    color: #ffffff !important;
}

.hero-section h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-section p {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-section .text-white {
    color: #ffffff !important;
}

/* Tab System */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    flex: 1;
}

/* Navigation Links */
.nav-link {
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--warning-color) !important;
}

.nav-link.active {
    color: var(--warning-color) !important;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Score Display */
.score-display {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.score-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--danger-color));
}

.score-number {
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* Compliance Levels */
.compliance-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.compliance-fully { background-color: var(--success-color); color: white; }
.compliance-mostly { background-color: var(--info-color); color: white; }
.compliance-needs { background-color: var(--warning-color); color: var(--dark-color); }
.compliance-non { background-color: var(--danger-color); color: white; }

/* Category Progress */
.category-progress {
    margin-bottom: 1.5rem;
}

.category-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 600;
    color: var(--dark-color);
}

.category-score {
    font-weight: 700;
    color: var(--primary-color);
}

.category-weight {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-left: auto;
}

/* Progress Bars */
.progress {
    height: 12px;
    border-radius: 10px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Progress status text: same color as "Analysis Progress" heading (inherit for light/dark consistency) */
#progress-status {
    color: inherit;
    font-weight: 500;
}

/* URL hint: same as surrounding text (form-text is muted grey, poor on dark backgrounds) */
.url-hint-text {
    color: inherit;
}

/* Assessment Results */
.test-result {
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    margin-bottom: 0.75rem;
    background: white;
    transition: all 0.3s ease;
}

.test-result:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.test-result.pass {
    border-left-color: var(--success-color);
    background: linear-gradient(90deg, rgba(25, 135, 84, 0.1), white);
}

.test-result.fail {
    border-left-color: var(--danger-color);
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.1), white);
}

.test-result.na {
    border-left-color: var(--secondary-color);
    background: linear-gradient(90deg, rgba(108, 117, 125, 0.1), white);
}

.test-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.test-status {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.test-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* Analysis Form */
.analysis-form {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 300px;
        padding: 2rem 0;
    }
    
    .score-number {
        font-size: 3rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-weight {
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color), #004085) !important;
    color: #ffffff !important;
}

/* Force text visibility in gradient backgrounds */
.bg-gradient * {
    color: #ffffff !important;
}

/* AI Revolution Section Gradients */
.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545, #a71e2a) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #198754, #146c43) !important;
}

/* AI Revolution Cards Enhancement */
.ai-revolution-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ai-revolution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15) !important;
}

.shadow-soft {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--info-color)) 1;
}

/* Button improvements */
#analyze-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

/* Assessment checklist styles */
.assessment-checklist {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    background: white;
}

.assessment-item {
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
    background-color: #ffffff;
    color: #212529;
}

.assessment-item:hover {
    background-color: #f8f9fa;
    color: #212529;
    border-color: #dee2e6;
}

.assessment-item.completed {
    background-color: rgba(25, 135, 84, 0.1);
}

.test-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.test-name {
    font-weight: 500;
    color: #212529;
}

.metric h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Assessment Details Accordion */
.show-details-btn {
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

.show-details-btn:hover {
    text-decoration: underline;
    color: var(--info-color);
}

.show-details-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.assessment-items-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

/* Button Container Hide Animation */
.button-container-hiding {
    max-height: 0 !important;
    opacity: 0;
    overflow: hidden;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transition: max-height 0.35s ease, opacity 0.35s ease, margin 0.35s ease, padding 0.35s ease;
}

/* Smooth collapse animation (Bootstrap handles this, but we ensure it's smooth) */
.collapse {
    transition: height 0.35s ease;
}

/* Footer Styles */
footer {
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

footer p {
    color: #ffffff !important;
    margin: 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: var(--dark-color);
        color: white;
    }
    
    .test-result {
        background-color: #343a40;
        color: white;
    }
}
