/**
 * Livescore Lookup - Frontend Styles
 */

.ll-lookup-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    margin: 1.5rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3e50;
}

.ll-lookup-wrapper *,
.ll-lookup-wrapper *::before,
.ll-lookup-wrapper *::after {
    box-sizing: border-box;
}

.ll-lookup-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.ll-lookup-desc {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 1rem 0;
}

/* Zoekbox container */
.ll-search-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.ll-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
}

/* Invoerveld */
.ll-input-wrapper {
    position: relative;
    flex: 1 1 260px;
    display: flex;
    align-items: center;
}

.ll-icon-search {
    position: absolute;
    left: 0.85rem;
    width: 1.25rem;
    height: 1.25rem;
    color: #94a3b8;
    pointer-events: none;
}

.ll-input-field {
    width: 100%;
    height: 46px;
    padding: 0 2.2rem 0 2.6rem;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

.ll-input-field:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.ll-clear-btn {
    position: absolute;
    right: 0.75rem;
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.15s ease;
}

.ll-clear-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

/* District Dropdown */
.ll-select-wrapper {
    flex: 0 1 240px;
    min-width: 180px;
}

.ll-district-select {
    width: 100%;
    height: 46px;
    padding: 0 0.85rem;
    font-size: 0.9rem;
    color: #334155;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.ll-district-select:focus {
    border-color: #3b82f6;
}

/* Submit knop */
.ll-submit-btn {
    height: 46px;
    padding: 0 1.5rem;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ll-submit-btn:hover {
    background: #1d4ed8;
}

.ll-submit-btn:active {
    transform: scale(0.98);
}

/* Loading Spinner */
.ll-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.ll-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ll-spin 0.75s linear infinite;
}

@keyframes ll-spin {
    to { transform: rotate(360deg); }
}

.ll-loading-text {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 500;
}

/* Alerts / Meldingen */
.ll-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.ll-alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ll-alert-empty {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.ll-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Resultaten Header */
.ll-results-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.ll-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ll-results-count {
    font-weight: 600;
    font-size: 0.92rem;
    color: #334155;
}

.ll-cached-badge {
    font-size: 0.75rem;
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Tabel */
.ll-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ll-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.ll-table th {
    background: #f1f5f9;
    padding: 0.85rem 1rem;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.ll-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.ll-table tr:hover td {
    background-color: #f8fafc;
}

.ll-text-center {
    text-align: center;
}

/* Cel details */
.ll-player-title {
    font-weight: 600;
    color: #0f172a;
}

.ll-sub-id {
    color: #64748b;
    font-size: 0.82rem;
    margin-left: 4px;
}

.ll-category-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.78rem;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.ll-moyenne-val {
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

/* Status Badges */
.ll-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ll-status-opgave {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ll-status-definitief {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.ll-status-reserve {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.ll-status-afgemeld {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Mobiele Kaarten Weergave (Verborgen op Desktop) */
.ll-cards-list {
    display: none;
    padding: 1rem;
    gap: 0.85rem;
    flex-direction: column;
}

.ll-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.ll-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

.ll-card-tournament {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.ll-card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.87rem;
    border-top: 1px dashed #f1f5f9;
}

.ll-card-label {
    color: #64748b;
}

.ll-card-value {
    font-weight: 500;
    color: #1e293b;
    text-align: right;
}

/* Responsiveness */
@media (max-width: 720px) {
    .ll-table-responsive {
        display: none;
    }

    .ll-cards-list {
        display: flex;
    }

    .ll-search-row {
        flex-direction: column;
    }

    .ll-select-wrapper,
    .ll-submit-btn {
        width: 100%;
        flex: 1 1 100%;
    }
}

/* ==========================================================================
   Widget & Modal Popup Mode
   ========================================================================== */

/* Compact styling voor widgets */
.ll-widget-mode .ll-search-box {
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: none;
    background: transparent;
    border: none;
}

.ll-widget-mode .ll-search-row {
    flex-direction: column;
    gap: 0.5rem;
}

.ll-widget-mode .ll-input-wrapper,
.ll-widget-mode .ll-select-wrapper,
.ll-widget-mode .ll-submit-btn {
    width: 100%;
    flex: 1 1 100%;
}

/* Modal Backdrop */
.ll-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background-color: rgba(15, 23, 42, 0.65);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    box-sizing: border-box;
}

.ll-modal-backdrop.ll-modal-active {
    opacity: 1;
    visibility: visible;
}

/* Modal Venster */
.ll-modal-window {
    background: #ffffff;
    width: 100%;
    max-width: 950px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.ll-modal-backdrop.ll-modal-active .ll-modal-window {
    transform: translateY(0) scale(1);
}

/* Modal Header */
.ll-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.4rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ll-modal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ll-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.ll-modal-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

.ll-modal-close-btn {
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
    line-height: 1;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s ease;
}

.ll-modal-close-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
    transform: scale(1.05);
}

/* Modal Inhoud */
.ll-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.ll-modal-body .ll-results-container {
    border: none;
    box-shadow: none;
}

/* Modal Footer */
.ll-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.85rem 1.4rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.ll-modal-btn-dismiss {
    height: 38px;
    padding: 0 1.25rem;
    background: #e2e8f0;
    color: #334155;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ll-modal-btn-dismiss:hover {
    background: #cbd5e1;
    color: #0f172a;
}

