/* ==========================================================
   Capri Register V4
   style.css
========================================================== */

:root{
    --bg:#02426B;
    --header:#2c3e50;
    --toolbar:#0b4f7d;
    --border:#40607a;
    --hover:#0d5d8a;
    --text:#ffffff;
    --button:#35536d;
    --buttonHover:#4d6f8c;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    background:var(--bg);
    color:var(--text);
}

/* ----------------------------------------------------------
   Kopf
---------------------------------------------------------- */

.topbar{

    background:var(--header);

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:12px 20px;

    border-bottom:2px solid var(--border);

}

.title h1{

    margin:0;

    font-size:28px;

}

.version{

    font-size:13px;

    opacity:.8;

}

.counter{

    font-size:18px;

    font-weight:bold;

}

/* ----------------------------------------------------------
   Werkzeugleiste
---------------------------------------------------------- */

.toolbar{

    display:flex;

    gap:10px;

    flex-wrap:wrap;

    align-items:center;

    padding:12px 20px;

    background:var(--toolbar);

}

.toolbar input,
.toolbar select,
.toolbar button{

    padding:8px 12px;

    border-radius:6px;

    border:1px solid var(--border);

    font-size:14px;

}

.toolbar input{

    min-width:260px;

}

.toolbar button{

    background:var(--button);

    color:white;

    cursor:pointer;

}

.toolbar button:hover{

    background:var(--buttonHover);

}

/* ----------------------------------------------------------
   Status
---------------------------------------------------------- */

.statusbar{

    padding:8px 20px;

    background:#183247;

    font-size:14px;

}

/* ----------------------------------------------------------
   Tabelle
---------------------------------------------------------- */

main{

    padding:0 15px 15px;

}

/* ----------------------------------------------------------
   Tabulator Capri Design
---------------------------------------------------------- */

.tabulator{
    background:#02426B !important;
    color:#ffffff !important;
    border:1px solid #2d5673;
    font-size:14px;

    height:calc(100vh - 220px);
}

/* ==========================================================
   TABULATOR
========================================================== */

/* Kopfzeile */

.tabulator-header {
    background: #1B3650 !important;
    color: white !important;
    border-bottom: 2px solid #4b6c88;
}

.tabulator-col {
    background: #1B3650 !important;
    color: white !important;
    border-right: 1px solid #3c5e7b;
    font-weight: bold;
}


/* ==========================================================
   Zeilen – komplett weiß
========================================================== */

.tabulator-row {
    background: #ffffff !important;
    color: #222222 !important;
    border-bottom: 1px solid #d9e0e6;
}


/* Auch gerade Zeilen weiß */

.tabulator-row:nth-child(even) {
    background: #ffffff !important;
}


/* Hover – dezente Hervorhebung */

.tabulator-row:hover {
    background: #f5f5f5 !important;
}


/* ==========================================================
   Zellen
========================================================== */

.tabulator-cell {
    background: transparent !important;
    color: #222222 !important;
    border-right: 1px solid #d9e0e6;
    padding: 6px;
}

/* Fixierte Spalten */

.tabulator-frozen,
.tabulator-frozen .tabulator-cell{
    background:#013454 !important;
    color:#ffffff !important;
}

/* Footer */

.tabulator-footer{

    background:#1B3650 !important;

    color:white !important;

    border-top:2px solid #4b6c88;

}




/* ----------------------------------------------------------
   Lightbox
---------------------------------------------------------- */

#lightbox {
    position: fixed;
    inset: 0;

    display: flex;

    background: rgba(0,0,0,.92);

    justify-content: center;
    align-items: center;

    z-index: 999999;

    opacity: 0;
    visibility: hidden;

    transition: opacity .25s ease;
}

#lightbox.show {
    opacity: 1;
    visibility: visible;
}

#lightbox img{

    max-width:94vw;

    max-height:92vh;

    object-fit:contain;

    border-radius:8px;

}

#closeLightbox{

    position:absolute;

    top:18px;

    right:30px;

    font-size:56px;

    color:white;

    cursor:pointer;

}

.lightboxToolbar{

    position:absolute;

    bottom:20px;

}

#downloadImage{

    color:white;

    background:var(--button);

    padding:10px 20px;

    border-radius:6px;

    text-decoration:none;

}

#downloadImage:hover{

    background:var(--buttonHover);

}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */

@media (max-width:900px){

    .toolbar{

        flex-direction:column;

        align-items:stretch;

    }

    .toolbar input{

        min-width:100%;

    }

.thumbnail{

    width:120px;

    height:80px;

    object-fit:contain;

    background:white;

    border-radius:6px;

    border:2px solid #ffffff;

    padding:2px;

    cursor:pointer;

    transition:0.2s;

}

.thumbnail:hover{

    transform:scale(1.05);

    box-shadow:0 0 10px rgba(255,255,255,.6);

}

}

/* ----------------------------------------------------------
Horizontale Bildlaufleiste
---------------------------------------------------------- */

#registerTable {
    width: 100%;
    overflow-x: auto;
}

/* ==========================================================
   Status-Badge
========================================================== */

.status-badge{

    display:inline-block;

    min-width:90px;

    text-align:center;

    padding:4px 10px;

    border-radius:20px;

    color:white;

    font-weight:bold;

    font-size:12px;

    box-shadow:0 0 4px rgba(0,0,0,.4);

}

/* ==========================================================
   Lightbox Animation
========================================================== */

#lightbox{

    opacity:0;

    visibility:hidden;

    transition:opacity .25s ease;

}

#lightbox.show{

    opacity:1;

    visibility:visible;

}


/* ==========================================================
   Lightbox Loader
========================================================== */

#lightboxLoader{

    position:absolute;

    left:50%;

    top:50%;

    width:60px;

    height:60px;

    margin-left:-30px;

    margin-top:-30px;

    border:6px solid rgba(255,255,255,.25);

    border-top:6px solid #ffffff;

    border-radius:50%;

    animation:spin .8s linear infinite;

    display:none;

    z-index:1002;

}

@keyframes spin{

    from{

        transform:rotate(0deg);

    }

    to{

        transform:rotate(360deg);

    }

}

/* ==========================================================
   Lightbox Informationen
========================================================== */

#lightboxInfo{

    position:absolute;

    bottom:20px;

    left:50%;

    transform:translateX(-50%);

    background:rgba(0,0,0,.75);

    color:white;

    padding:12px 20px;

    border-radius:10px;

    font-size:15px;

    display:flex;

    gap:25px;

    z-index:1005;

    flex-wrap:wrap;

}

#lightboxInfo strong{

    color:#8fd3ff;

}

/* ==========================================================
   Navigation
========================================================== */

.lightboxNav{

    position:absolute;

    top:50%;

    transform:translateY(-50%);

    width:55px;

    height:55px;

    border:none;

    border-radius:50%;

    background:rgba(0,0,0,.45);

    color:white;

    font-size:34px;

    cursor:pointer;

    transition:.2s;

    z-index:1004;

}

.lightboxNav:hover{

    background:rgba(255,255,255,.25);

}

#prevImage{

    left:25px;

}

#nextImage{

    right:25px;

}


/* ==========================================================
   Suchleiste
========================================================== */

.toolbar {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#globalSearch{

    width:350px;

    padding:10px 14px;

    font-size:15px;

    border:1px solid #b5c8df;

    border-radius:8px;

    outline:none;

    transition:.2s;

}

#globalSearch:focus{

    border-color:#2b6cb0;

    box-shadow:0 0 8px rgba(43,108,176,.25);

}


/* ==========================================================
   Filter zurücksetzen
========================================================== */

#resetFilters{

    padding:10px 16px;

    border:none;

    border-radius:8px;

    background:#dbeafe;

    color:#1e3a8a;

    cursor:pointer;

    transition:.2s;

}

#resetFilters:hover{

    background:#bfdbfe;

}

/* ==========================================================
   Trefferzähler
========================================================== */

#resultCounter{

    margin-left:auto;

    padding:6px 14px;

    min-width:150px;

    text-align:center;

    border-radius:8px;

    background:rgba(255,255,255,0.18);

    border:1px solid rgba(255,255,255,0.25);

    color:#ffffff;

    font-size:15px;

    font-weight:600;

    letter-spacing:.3px;

    white-space:nowrap;

    box-shadow:0 2px 6px rgba(0,0,0,.15);

}

/* ==========================================================
   Status-Badges
========================================================== */

.status-badge{

    display:inline-block;

    min-width:90px;

    padding:4px 10px;

    border-radius:12px;

    text-align:center;

    font-size:13px;

    font-weight:600;

    color:#ffffff;

}

/* ----------------------------------------------------------
   Statusfarben
---------------------------------------------------------- */

.status-current{

    background:#28a745;

}

.status-fahrbereit{

    background:#198754;

}

.status-restoration{

    background:#fd7e14;

}

.status-stored{

    background:#0d6efd;

}

.status-scrapped{

    background:#dc3545;

}

.status-unknown{

    background:#6c757d;

}


/* ==========================================================
   Datenschutz Eigentümer
========================================================== */

.owner-private{

    display:inline-block;

    min-width:80px;

    padding:2px 8px;

    border-radius:10px;

    text-align:center;

    font-size:11px;

    font-weight:600;

    color:#ffffff;

    background:#6c757d;

    border:1px solid #5a6268;

    line-height:1.2;

    white-space:nowrap;

}


/* ----------------------------------------------------------
   Gemeinsamer Footer
---------------------------------------------------------- */

footer {
    background: #0b4f7d;
    color: #fff;
    margin-top: 15px;
    padding: 15px 20px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-content h3 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.footer-nav {
    margin-bottom: 10px;
}

.footer-nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 8px;
    font-size: 15px;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 10px;
    font-size: 13px;
    color: #d9e2ea;
}

/* ----------------------------------------------------------
   Register – Abstand zum Footer
---------------------------------------------------------- */

body:has(#registerTable) > footer {
    margin-top: 15px !important;
}

/* ----------------------------------------------------------
    Hinweisfeld für vertrauliche Eigentümerangaben
---------------------------------------------------------- */


.confidential-info {
    position: relative;
    display: inline-block;
    cursor: help;
}

.confidential-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 9999;

    width: 260px;
    padding: 12px 14px;

    background: #333;
    color: #fff;
    text-align: left;
    font-size: 13px;
    line-height: 1.4;

    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);

    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);

    transition: opacity 0.2s ease;
}

/* Kleiner Pfeil nach unten */
.confidential-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;

    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Tooltip beim Überfahren anzeigen */
.confidential-info:hover .confidential-tooltip {
    visibility: visible;
    opacity: 1;
}


/* ==========================================================
   Mauszeiger im Register
   ========================================================== */

/* Normale Tabellenzellen: normaler Mauszeiger */
.tabulator-cell {
    cursor: default !important;
}

/* Thumbnail: anklickbar */
.tabulator-cell .thumbnail {
    cursor: pointer !important;
}

/* Eigentümer "Vertraulich": Hinweis verfügbar */
.tabulator-cell .owner-private {
    cursor: help !important;
}
