@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&family=Space+Grotesk:wght@700&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

.font-outfit {
    font-family: 'Outfit', sans-serif;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* TAM / SAM / SOM Concentric Diagram Styles */
.market-map-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.market-circle {
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.market-circle:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.circle-tam {
    width: 100%;
    height: 100%;
    background: rgba(37, 99, 235, 0.05);
    border: 2px dashed rgba(37, 99, 235, 0.3);
    position: relative;
}

.dark .circle-tam {
    background: rgba(37, 99, 235, 0.08);
    border: 2px dashed rgba(96, 165, 250, 0.4);
}

.circle-sam {
    width: 75%;
    height: 75%;
    background: rgba(124, 58, 237, 0.08);
    border: 2px dashed rgba(124, 58, 237, 0.4);
    position: absolute;
}

.dark .circle-sam {
    background: rgba(124, 58, 237, 0.12);
    border: 2px dashed rgba(167, 139, 250, 0.5);
}

.circle-som {
    width: 50%;
    height: 50%;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(37, 99, 235, 0.15));
    border: 2px solid rgba(6, 182, 212, 0.6);
    position: absolute;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.15);
}

.dark .circle-som {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(37, 99, 235, 0.2));
    border: 2px solid rgba(6, 182, 212, 0.8);
}

/* Inline Editable Fields styling */
.editable-field {
    position: relative;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 1.5em;
    display: inline-block;
}

.editable-field:hover {
    background-color: rgba(37, 99, 235, 0.05);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.dark .editable-field:hover {
    background-color: rgba(96, 165, 250, 0.1);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.editable-field::after {
    content: "\f304"; /* FontAwesome Pencil icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    position: absolute;
    top: 50%;
    right: -18px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #3b82f6;
}

.editable-field:hover::after {
    opacity: 0.7;
}

/* When active editing input */
.edit-input {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    background-color: #fff;
    border: 2px solid #2563eb;
    border-radius: 6px;
    padding: 2px 6px;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
    width: 100%;
    box-sizing: border-box;
}

.dark .edit-input {
    background-color: #1e293b;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}

.edit-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Glassmorphism styling */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass-panel {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Dynamic slider track customized styles */
input[type="range"]::-webkit-slider-runnable-track {
    background: #e2e8f0;
    border-radius: 9999px;
    height: 8px;
}
.dark input[type="range"]::-webkit-slider-runnable-track {
    background: #334155;
}
input[type="range"]::-webkit-slider-thumb {
    background: #2563eb;
    border: 2px solid #ffffff;
    border-radius: 9999px;
    height: 20px;
    width: 20px;
    margin-top: -6px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    -webkit-appearance: none;
}
.dark input[type="range"]::-webkit-slider-thumb {
    background: #60a5fa;
}

/* GRIMONT GLOBAL HEADER (identical to algorithms app) */
.grimont-global-header {
    width: 100%;
    z-index: 1000;
    position: sticky;
    top: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    color: #e2e8f0;
    box-sizing: border-box;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
.grimont-global-header * { box-sizing: border-box; }
.grimont-global-header .ggh-container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ggh-left { display: flex; align-items: center; gap: 1.5rem; }
.ggh-logo-group {
    display: flex; align-items: center; gap: 0.875rem; text-decoration: none; transition: transform 0.2s ease;
}
.ggh-logo-group:hover { transform: scale(1.02); }
.ggh-logo-box {
    width: 40px; height: 40px; background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: white; font-weight: bold; font-size: 1.25rem; border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.25); flex-shrink: 0;
}
.ggh-logo-text {
    font-family: 'Space Grotesk', monospace; font-weight: 800; font-size: 1.2rem;
    color: white; letter-spacing: 0.05em; display: none;
}
.ggh-logo-text span { color: #00f2ff; }
@media (min-width: 640px) { .ggh-logo-text { display: block; } }
.ggh-separator { width: 1px; height: 36px; background-color: rgba(255, 255, 255, 0.1); display: none; }
@media (min-width: 768px) { .ggh-separator { display: block; } }
.ggh-app-info { display: flex; flex-direction: column; justify-content: center; }
.ggh-app-title-group { display: flex; align-items: center; gap: 0.6rem; }
.ggh-app-icon-container {
    width: 32px; height: 32px; border-radius: 8px; background: rgba(30, 41, 59, 1);
    border: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #60a5fa; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); flex-shrink: 0;
}
.ggh-app-name { font-weight: 700; color: white; font-size: 1.05rem; margin: 0; padding: 0; letter-spacing: 0.02em; }
.ggh-app-desc {
    font-size: 0.8rem; color: #94a3b8; max-width: 600px;  
     display: none; margin: 4px 0 0 0; padding: 0; line-height: 1.4; font-weight: 300;
}
@media (min-width: 1024px) { .ggh-app-desc { display: block; } }
.ggh-right { display: flex; align-items: center; gap: 1rem; }
.ggh-right button {
    background: rgba(30, 41, 59, 0.6) !important; border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important; width: 40px !important; height: 40px !important;
    border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important; transition: all 0.2s ease !important; padding: 0 !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}
.ggh-right button:hover {
    background: rgba(30, 41, 59, 1) !important; color: white !important; border-color: rgba(255, 255, 255, 0.2) !important; transform: translateY(-1px) !important;
}

/* Strategic Opportunity Blocks Styles */
.opp-card {
    border-left: 4px solid #6366f1;
    background-color: #f8fafc;
    padding: 1.25rem;
    border-radius: 0 0.75rem 0.75rem 0;
    transition: transform 0.2s ease;
}
.dark .opp-card {
    border-left-color: #818cf8;
    background-color: #0f172a;
}
.opp-card:hover {
    transform: translateX(4px);
}

.recommendation-box {
    border: 1px solid #10b981;
    background-color: rgba(16, 185, 129, 0.03);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}
.dark .recommendation-box {
    border-color: rgba(16, 185, 129, 0.4);
    background-color: rgba(16, 185, 129, 0.05);
}

.example-quote {
    border-left: 3px solid #06b6d4;
    background-color: rgba(6, 182, 212, 0.03);
    padding: 0.5rem 1rem;
    font-style: italic;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    border-radius: 0 0.25rem 0.25rem 0;
}
.dark .example-quote {
    border-left-color: rgba(6, 182, 212, 0.5);
    background-color: rgba(6, 182, 212, 0.05);
}

/* Risks / Vigilance items */
.custom-list-indigo li {
    position: relative;
    padding-left: 1.5rem;
}
.custom-list-indigo li::before {
    content: "▲";
    color: #f43f5e;
    font-size: 0.75rem;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Locality button states */
.btn-locality.active-locality {
    background-color: #2563eb !important;
    color: white !important;
    border-color: #2563eb !important;
}

.btn-locality.locality-extrapolated::after {
    content: "Est.";
    position: absolute;
    top: -5px;
    right: 5px;
    background-color: #f59e0b;
    color: white;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .btn-locality.locality-extrapolated::after {
    background-color: #d97706;
}

.btn-locality.locality-extrapolated {
    border-style: dotted !important;
    border-width: 2px !important;
}

@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    .grimont-global-header, .no-print {
        display: none !important;
    }
    .print-header {
        display: flex !important;
    }
}
