/* --- Basis & Container --- */
body {
    /* Optional: background-color: #f8f9fa; */
    /* Optional: font-family: sans-serif; */ /* Stel een basis font in */
}

.main-title,
.main-subtitle {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.main-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 5px;
    color: #111827; /* Zwartachtig */
}

.main-subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    color: #374151; /* Donkergrijs */
}


.tjiktjak-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    max-width: 90vw; /* Totale breedte limiet */
    margin: 20px auto; /* Centreer op de pagina */
    gap: 30px; /* Ruimte tussen logo, interactie, en resultaten */
}


/* --- Main Interaction Area (Character + Search) --- */
.main-interaction-area {
    display: flex;
    align-items: center;      /* *** GEWIJZIGD: Verticaal centreren *** */
    gap: 50px;                /* *** GEWIJZIGD: Meer ruimte *** */
    width: 100%;
    justify-content: center;  /* Centreert de groep horizontaal */
    flex-wrap: wrap;          /* Toestaan van wrapping op smalle schermen */
    margin-top: 20px;
    margin-bottom: 20px;
}

/* --- Character and Speech Bubble --- */
.character-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0; /* Voorkomt dat deze sectie krimpt */
}

.character-image {
    height: 180px;            /* *** GEWIJZIGD: Groter karakter *** */
    width: auto;
    margin-bottom: -15px;     /* *** GEWIJZIGD: Bubbel verder omhoog trekken *** */
    z-index: 1;               /* Zorgt dat karakter over bubbel kan */
}

.speech-bubble {
    background-color: #e0f2fe; /* Lichtblauw */
    color: #0c4a6e;            /* Donkerder blauw */
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid #bae6fd; /* Nog lichter blauw rand */
    position: relative;
    max-width: 250px;          /* Limiteer breedte */
    text-align: center;
    font-size: 0.95rem;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 0;               /* Zorgt dat bubbel achter karakter kan */
}

/* Speech Bubble Triangle */
.speech-bubble::before {
    content: '';
    position: absolute;
    top: -10px;                /* Boven de bubbel */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #e0f2fe; /* Match bubbel achtergrond */
    filter: drop-shadow(0 -1px 0px #bae6fd); /* Match rand kleur */
}

.speech-bubble strong {
    color: #0369a1; /* Iets donkerder blauw voor accent */
    font-weight: 600;
}

/* --- Search Form Area --- */
.search-form-section {
    display: flex;
    flex-direction: column;
    align-items: center;      /* Centreert form en status berichten */
    max-width: 550px;         /* Limiteer breedte zoekgedeelte */
    width: 100%;              /* Zorgt dat het max-width kan bereiken */
    /* flex-grow: 1; verwijderd */
}

.search-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

.search-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    padding-left: 20px;
}

.search-form {
    display: flex;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid #ced4da;
    background-color: #fff;
}

.scope-tooltip {
    position: relative;
    top: -14px;
    right: 25px;
    background-color: #fef08a; /* zacht geel */
    color: #92400e; /* bruin/oranje tekst */
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 9999px; /* pill vorm */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    opacity: 0.95;
    transform: translateY(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 10;
}

/* Parent moet relative zijn */
.search-form-wrapper {
    position: relative;
}


.search-input {
    flex-grow: 1;             /* Neemt beschikbare ruimte */
    padding: 15px 25px;
    font-size: 1rem; /* Iets kleiner dan voorheen */
    border: none;
    outline: none;
    border-radius: 50px 0 0 50px; /* Rond linker kant af */
    min-width: 220px;        /* Minimale breedte */
    color: #495057; /* Standaard input tekst kleur */
}
.search-input::placeholder {
    color: #6c757d; /* Placeholder kleur */
}


.search-button {
    padding: 15px 25px;
    font-size: 1rem; /* Match input font size */
    background-color: #facc15; /* Geel */
    color: #422006; /* Donkerbruin/zwart contrast */
    border: none;
    cursor: pointer;
    border-radius: 0 50px 50px 0; /* Rond rechter kant af */
    transition: background-color 0.2s ease;
    white-space: nowrap;
    /* *** NIEUW: Flexbox voor icoon + tekst *** */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* *** NIEUW: Styling voor het zoekicoon *** */
.search-button .search-icon {
    margin-right: 8px;  /* Ruimte tussen icoon en tekst */
    font-size: 1.1em;   /* Maak icoon iets groter relatief t.o.v. tekst */
    line-height: 1;     /* Zorgt voor betere verticale centrering */
}

.search-button:hover:not(:disabled) {
    background-color: #eab308; /* Donkerder geel bij hover */
}

.search-button:disabled {
    background-color: #e9ecef; /* Lichter grijs voor disabled */
    color: #6c757d; /* Gedempte tekstkleur */
    cursor: not-allowed;
}

.search-label {
    align-self: flex-start;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151; /* Neutrale tekstkleur */
}

.scope-note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
}

/* --- Status Messages --- */
.status-message {
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 1.2em; /* Voorkomt layout shift */
    text-align: center; /* Centreer de berichten */
    width: 100%; /* Zorg dat het centreren werkt binnen de sectie */
}

.status-message.searching {
    color: #6c757d; /* Grijs */
}

.status-message.error {
    color: #dc3545; /* Rood */
    font-weight: 500;
}

/* --- Search Results Styling --- */
.search-results {
    width: 100%;
    max-width: 90vw;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef; /* Subtiele rand */
}

.search-results h2 {
    margin-bottom: 20px; /* Meer ruimte onder titel */
    text-align: center;
    color: #343a40; /* Donkerder grijs */
    font-size: 1.5rem;
    font-weight: 500;
}

.company-list {
    display: grid;
    gap: 15px; /* Ruimte tussen de knoppen */

    /* --- Responsive Kolommen --- */

    /* Standaard (kleine schermen): 1 kolom */
    grid-template-columns: 1fr; /* Of repeat(1, 1fr) */

    /* Medium schermen (bv. tablets): 2 kolommen */
    @media (min-width: 640px) { /* Pas dit breakpoint eventueel aan */
        grid-template-columns: repeat(2, 1fr); /* 2 gelijke kolommen */
    }

    /* Grote schermen (bv. desktops): 3 kolommen */
    @media (min-width: 1024px) { /* Pas dit breakpoint eventueel aan */
        grid-template-columns: repeat(3, 1fr); /* 3 gelijke kolommen */
    }
}

.company-button {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    width: 100%;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #212529;
}

.company-button:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.company-button strong {
    font-size: 1.1em;
    color: #0056b3;
    font-weight: 600;
}

.company-button small {
    color: #6c757d;
    display: block;
    margin-top: 4px;
    font-size: 0.9em;
}

.company-button.company-inactive {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #842029;
}

.company-button.company-inactive:hover {
    background-color: #f5c2c7;
    border-color: #f1aeb5;
}

.company-button.company-inactive strong {
    color: #842029;
}

.company-button.company-inactive small {
    color: #a94442;
}

.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px; /* Pil vorm */
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 5px;
    border: 1px solid transparent;
    line-height: 1.4;
    margin-bottom: 4px;
}

/* Status Tag Kleuren (Voorbeelden) */
.status-tag.status-active {
    background-color: #d1e7dd; /* Lichtgroen */
    color: #0f5132;            /* Donkergroen */
    border-color: #badbcc;
}
.status-tag.status-inactive {
    background-color: #f8d7da; /* Lichtrood */
    color: #842029;            /* Donkerrood */
    border-color: #f5c2c7;
}
.status-tag.status-unknown {
    background-color: #e2e3e5; /* Grijs */
    color: #41464b;            /* Donkerder grijs */
    border-color: #d3d6d8;
}

/* --- Pagination Styling --- */
.pagination {
    margin-top: 25px; /* Iets meer ruimte */
    padding-top: 15px; /* Ruimte boven pagination */
    border-top: 1px solid #e9ecef; /* Lijn boven pagination */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #6c757d;
}

.pagination button {
    background-color: #fff;
    border: 1px solid #ced4da;
    color: #0d6efd; /* Blauw voor knop tekst */
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background-color: #e9ecef; /* Lichte achtergrond bij hover */
    color: #0056b3; /* Donkerder blauw */
}

.pagination button:disabled {
    color: #adb5bd; /* Nog lichter grijs voor disabled */
    cursor: not-allowed;
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.search-form-section {
    align-items: center;
    text-align: center;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .main-interaction-area {
        flex-direction: column; /* Stapel karakter en zoekbalk */
        align-items: center;
        gap: 30px;           /* *** GEWIJZIGD: Iets minder gap *** */
    }

    .character-section {
        order: 1;            /* Karakter eerst */
        margin-bottom: 0;    /* Geen extra marge nodig */
    }

    .search-form-section {
        order: 2;            /* Zoekbalk daarna */
        width: 90%;          /* Iets smaller dan 95% */
        max-width: 500px;
    }

    .search-input, .search-button {
        font-size: 1rem;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .tjiktjak-container {
        padding: 20px 15px; /* Minder padding op mobiel */
    }

    .tjiktjak-logo {
        max-height: 40px; /* Nog kleiner logo */
    }

    .character-image {
        height: 140px; /* Kleiner karakter op mobiel */
        margin-bottom: -10px;
    }

    .speech-bubble {
        max-width: 200px; /* Smallere bubbel */
        font-size: 0.85rem;
        padding: 10px 15px;
    }
    .speech-bubble::before { /* Driehoek iets kleiner */
        border-left-width: 8px;
        border-right-width: 8px;
        border-bottom-width: 8px;
        top: -8px;
    }

    .search-form-section {
        width: 95%; /* Bijna volledige breedte */
    }

    .search-input, .search-button {
        font-size: 0.9rem; /* Kleinere tekst */
        padding: 10px 15px; /* Minder padding */
    }
    .search-button .search-icon {
        margin-right: 5px; /* Minder ruimte naast icoon */
    }

    .company-button {
        padding: 12px;
        font-size: 0.9rem;
    }
    .company-button strong {
        font-size: 1em;
    }
    .company-button small {
        font-size: 0.85em;
    }

    .pagination {
        font-size: 0.85rem;
        gap: 5px;
    }
    .pagination button {
        padding: 6px 10px;
    }
}


/* Styling voor de loading indicator binnen de knop */
.company-button .button-loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center; /* Centreer inhoud */
    gap: 8px; /* Ruimte tussen spinner en tekst */
    width: 100%; /* Neem volledige breedte knop in */
    color: #0056b3; /* Blauwe kleur voor tekst */
    font-weight: 500;
}

/* Kleinere spinner voor in de knop */
.spinner-small {
    border: 3px solid rgba(0, 86, 179, 0.2); /* Lichtere variant van blauw */
    border-left-color: #0056b3; /* Blauwe boog */
    border-radius: 50%;
    width: 16px; /* Kleiner */
    height: 16px; /* Kleiner */
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

/* Hergebruik spin animatie indien nog niet globaal gedefinieerd */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styling voor knoppen die disabled zijn TIJDENS het checken van een ANDERE knop */
.company-button:disabled:not(.is-checking) {
    opacity: 0.6; /* Maak ze wat doorzichtiger */
    cursor: not-allowed;
    background-color: #f8f9fa; /* Behoud lichte achtergrond */
    border-color: #dee2e6; /* Behoud lichte rand */
}
.company-button:disabled:not(.is-checking):hover {
    /* Voorkom hover effect op disabled knoppen */
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Optioneel: Styling voor de knop die actief aan het checken is */
.company-button.is-checking {
    background-color: #e7f1ff; /* Zeer lichte blauwe achtergrond? */
    border-color: #adcfff; /* Lichtblauwe rand? */
    cursor: wait; /* Wacht-cursor */
}
.company-button.is-checking:hover {
    /* Voorkom standaard hover effect */
    background-color: #e7f1ff;
    border-color: #adcfff;
}


/* Optioneel: Disable pagination knoppen duidelijker */
.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Optioneel: Styling voor het extra statusbericht */
.status-message.checking-company {
    margin-top: 10px;
    font-style: italic;
    color: #555;
}

/* Alert.razor.css - Basic styling if not using Bootstrap */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    position: relative; /* Needed for button positioning */
}

.alert-dismissible {
    padding-right: 3rem; /* Make space for the close button */
}

/* Basic Error Styling */
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
/* Add .alert-success, .alert-info etc. if needed */


.btn-close {
    /* Basic styling for the 'X' button */
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1rem 1rem; /* Adjust padding */
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.25rem;
    opacity: .5;
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    color: #000;
    pointer-events: auto; /* Ensure it's clickable */
    cursor: pointer;
}

.btn-close:hover {
    opacity: .75;
}

.sticky-note-tip {
    background-color: #fef08a;
    color: #78350f;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: 'Comic Sans MS', 'Segoe Print', system-ui, sans-serif;
    padding: 10px 14px;
    border-radius: 4px 20px 4px 4px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    transform: rotate(-2.5deg);
    display: inline-block;
    max-width: 270px;
    line-height: 1.4;
    position: relative;
}

/* optioneel: plakkertje bovenaan */
.sticky-note-tip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 6px;
    background: #fcd34d;
    border-radius: 3px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}