/* ============================================
   ilmCode Smart Parking - LED Full-Screen Display
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

/* === Full Screen Wrapper === */
.sp-display-wrapper {
    width: 100%;
    height: 100vh;
    background: #0A0E1A;
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    position: relative;
}

.sp-display-wrapper:fullscreen {
    width: 100vw;
    height: 100vh;
}

/* === TOP HEADER BAR === */
.sp-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1a1f36 0%, #0d1025 100%);
    border-bottom: 2px solid #2563EB;
    flex-shrink: 0;
    gap: 16px;
}

.sp-display-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-display-logo {
    font-size: 36px;
    filter: drop-shadow(0 0 8px rgba(79, 70, 229, 0.6));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.sp-display-company {
    font-family: 'Orbitron', monospace;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #60A5FA, #818CF8, #A78BFA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.sp-display-datetime {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sp-display-date {
    font-size: 13px;
    color: #94A3B8;
    font-weight: 500;
}

.sp-display-time {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    font-weight: 700;
    color: #60A5FA;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.sp-display-stats {
    display: flex;
    gap: 16px;
}

.sp-display-stat {
    text-align: center;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sp-display-stat-num {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 800;
    display: block;
    color: #E2E8F0;
}

.sp-display-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 600;
}

.sp-stat-green .sp-display-stat-num {
    color: #34D399;
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
}

.sp-stat-red .sp-display-stat-num {
    color: #F87171;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

/* === MAIN BODY === */
.sp-display-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 16px;
    gap: 16px;
}

/* === ACTIVE PARKING BOXES (Grid) === */
.sp-display-slots {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    align-content: start;
    overflow-y: auto;
    padding-right: 8px;
}

.sp-display-slots::-webkit-scrollbar {
    width: 4px;
}

.sp-display-slots::-webkit-scrollbar-track {
    background: transparent;
}

.sp-display-slots::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Slot Box */
.sp-slot-box {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slotFadeIn 0.5s ease;
}

@keyframes slotFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sp-slot-occupied {
    border-width: 2px;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.15);
}

.sp-slot-available {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.03);
}

.sp-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sp-slot-name {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
}

.sp-slot-zone {
    font-size: 11px;
    opacity: 0.8;
}

/* Vehicle in Slot */
.sp-slot-vehicle {
    padding: 12px;
    text-align: center;
}

.sp-slot-icon {
    font-size: 32px;
    margin-bottom: 6px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.sp-slot-number {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #E2E8F0;
    letter-spacing: 1px;
    margin-bottom: 4px;
    word-break: break-all;
}

.sp-slot-serial {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 800;
    color: #60A5FA;
    letter-spacing: 3px;
    padding: 4px 10px;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 6px;
    display: inline-block;
    margin: 4px 0;
    text-shadow: 0 0 6px rgba(96, 165, 250, 0.3);
}

.sp-slot-time {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 4px;
}

.sp-slot-duration {
    font-size: 11px;
    color: #F59E0B;
    font-weight: 600;
    margin-top: 2px;
}

/* Available Slot */
.sp-slot-available .sp-slot-available {
    padding: 20px 12px;
    text-align: center;
}

.sp-slot-icon-available {
    font-size: 36px;
    margin-bottom: 6px;
    animation: availablePulse 2s ease-in-out infinite;
}

@keyframes availablePulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.sp-slot-text-available {
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #34D399;
    letter-spacing: 2px;
}

.sp-slot-remaining {
    font-size: 11px;
    color: #94A3B8;
    font-weight: 500;
    margin-top: 4px;
}

.sp-slot-full {
    border-color: rgba(220, 38, 38, 0.5);
    background: rgba(220, 38, 38, 0.06);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.1);
}

/* === SIDEBAR: Recent Ended === */
.sp-display-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sp-sidebar-header {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border-bottom: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #F87171;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.sp-sidebar-icon {
    font-size: 18px;
}

.sp-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.sp-sidebar-list::-webkit-scrollbar {
    width: 3px;
}

.sp-sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Recent Item */
.sp-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
    animation: recentSlideIn 0.4s ease;
}

@keyframes recentSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sp-recent-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sp-recent-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.sp-recent-info {
    flex: 1;
    min-width: 0;
}

.sp-recent-serial {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #94A3B8;
    letter-spacing: 1px;
}

.sp-recent-vehicle {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-recent-time {
    font-size: 11px;
    color: #475569;
}

.sp-recent-fee {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #34D399;
    flex-shrink: 0;
}

.sp-recent-empty {
    text-align: center;
    padding: 30px 12px;
    color: #475569;
    font-size: 13px;
}

/* === BOTTOM MARQUEE === */
.sp-display-footer {
    flex-shrink: 0;
    background: linear-gradient(135deg, #1a1f36 0%, #0d1025 100%);
    border-top: 2px solid #2563EB;
    overflow: hidden;
    height: 42px;
    display: flex;
    align-items: center;
}

.sp-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.sp-marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeScroll 30s linear infinite;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #60A5FA;
    letter-spacing: 1px;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* === Fullscreen Button === */
.sp-fullscreen-btn {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(79, 70, 229, 0.8);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.sp-fullscreen-btn:hover {
    background: #4F46E5;
    transform: scale(1.1);
}

/* === Loading Spinner === */
.sp-display-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #64748b;
}

.sp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(96, 165, 250, 0.2);
    border-top-color: #60A5FA;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

/* === Responsive === */
@media (max-width: 1024px) {
    .sp-display-header {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 10px;
    }

    .sp-display-company {
        font-size: 20px;
    }

    .sp-display-time {
        font-size: 22px;
    }

    .sp-display-sidebar {
        width: 200px;
    }

    .sp-display-slots {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .sp-display-body {
        flex-direction: column;
    }

    .sp-display-sidebar {
        width: 100%;
        max-height: 150px;
    }

    .sp-display-slots {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .sp-display-header {
        justify-content: center;
        text-align: center;
    }

    .sp-display-stats {
        justify-content: center;
    }
}