/* --- Style dla miniaturki --- */
.ct-shortcode {
    width: 100%;
    display: block;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.ct-shortcode .otomoto-360-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    overflow: hidden;
    display: block;
}

.ct-shortcode .otomoto-360-thumbnail .otomoto-360-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
}

.ct-shortcode .otomoto-360-thumbnail:hover .otomoto-360-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.ct-shortcode .otomoto-360-thumbnail .otomoto-launch-360 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.ct-shortcode .otomoto-360-thumbnail .otomoto-launch-360:hover {
    background-color: #005a87;
}

/* --- Style dla Lightboxa (WERSJA OSTATECZNA z !important i transform) --- */
.otomoto-360-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.85) !important;
    z-index: 2147483646 !important; /* Maksymalna możliwa wartość z-index */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.otomoto-360-viewer {
    width: 100%;
    height: 100%;
}

.otomoto-360-close {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    width: 40px !important;
    height: 40px !important;
    background: rgba(0, 0, 0, 0.5) !important; /* Przywrócony normalny kolor */
    color: white !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    font-size: 28px !important;
    line-height: 36px !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 2147483647 !important; /* Najwyższa możliwa wartość */
    padding: 0 !important;
    display: block !important;
    transform: translateZ(0); /* Trik zmuszający przeglądarkę do umieszczenia przycisku na osobnej warstwie */
}

/* --- Style dla spinnera ładowania --- */
.otomoto-360-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2147483647 !important; /* Spinner też musi być na wierzchu */
}

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