/* ===================================
   SHARED STYLES - Used Across All Pages
   =================================== */

/* Base Variables */
:root {
    --primary-color: #342b60;    /* TT DARK BLUE */
    --secondary-color: #9396b0;  /* TT GREY 1 (TERASHALL) */
    --accent-color: #AA1352;     /* TT Magenta */
    --light-bg: #f4f4f9;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #6c757d;
    --gray-600: #495057;
    --gray-700: #343a40;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;

    /* TT Brand Colors */
    --tt-light-blue: #4dbed2;   /* HELESININE - TT LIGHT BLUE, PANTONE® 631 C */
    --tt-grey-1: #9396b0;       /* TERASHALL - TT GREY 1, PANTONE® 7544 C */
    --tt-grey-2: #dadae4;       /* HELEHALL - TT GREY 2, PANTONE® 5305 C */
    
    /* Standardized Score Color Variables - Used Across All Alignment Reports */
    /* Using Pastel Color Scheme for Better Readability and Consistency */
    --score-poor: #ffcdd2;       /* Light Red - Poor (1.0-1.4) */
    --score-weak: #ffecb3;       /* Light Orange - Weak (1.5-2.4) */
    --score-moderate: #fff9c4;   /* Light Yellow - Moderate (2.5-3.4) */
    --score-good: #c8e6c9;       /* Light Green - Good (3.5-4.4) */
    --score-excellent: #a5d6a7;  /* Medium Green - Excellent (4.5-5.0) */
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--gray-700);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.75rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 500; }

/* Layout Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }

/* Spacing */
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid var(--gray-200);
}

.header-content h1 {
    margin: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-content p {
    margin: 5px 0 0 0;
    color: var(--gray-600);
    font-size: 1.1rem;
}

/* Button Base Styles */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    background: var(--tt-light-blue);
    color: black;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
    background: #399eb1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #2a1f4f;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #8a0e42;
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: var(--white);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Home Button */

/* Grid Layouts */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Card Base */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    padding: 20px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
}

.card-body {
    padding: 20px;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--gray-500);
    font-style: italic;
}

/* Error States */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

/* Success States */
.success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: var(--border-radius);
    border: 1px solid #c3e6cb;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .grid-auto {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}

/* ===============================
   Standardized Score Color Classes
   Used Across All Alignment Reports
   =============================== */

/* Score Background Colors */
.score-1 { 
    background-color: var(--score-poor); 
    color: black; 
    font-weight: 600; 
}

.score-2 { 
    background-color: var(--score-weak); 
    color: black; 
    font-weight: 600; 
}

.score-3 { 
    background-color: var(--score-moderate); 
    color: black; 
    font-weight: 600; 
}

.score-4 { 
    background-color: var(--score-good); 
    color: black; 
    font-weight: 600; 
}

.score-5 { 
    background-color: var(--score-excellent); 
    color: black; 
    font-weight: 600; 
}

/* Score Text Colors (for when only text color is needed) */
.score-text-1 { color: var(--score-poor); }
.score-text-2 { color: var(--score-weak); }
.score-text-3 { color: var(--score-moderate); }
.score-text-4 { color: var(--score-good); }
.score-text-5 { color: var(--score-excellent); }

/* Score Border Colors */
.score-border-1 { border-color: var(--score-poor); }
.score-border-2 { border-color: var(--score-weak); }
.score-border-3 { border-color: var(--score-moderate); }
.score-border-4 { border-color: var(--score-good); }
.score-border-5 { border-color: var(--score-excellent); }

/* Score Legend Component */
.score-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
    padding: 15px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.score-legend h4 {
    width: 100%;
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1rem;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.score-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}
