/*
 * Global CSS for bhouse.imagine.gt theme
 */

/* ==========================================================================
   Cascading Word Rotator (.rotate-words)
   ========================================================================== */

.rotate-words-container {
    display: inline-flex;
    position: relative;
    overflow: hidden;
    vertical-align: bottom;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    /* Ensure the container doesn't collapse if JS hasn't run yet */
    min-height: 1.2em; 
}

.rotate-word {
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
    /* Smooth CSS transitions for opacity and translation */
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active State: Slides in from top to middle */
.rotate-word.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Exit State: Slides out from middle to bottom */
.rotate-word.exit {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
}

/* ==========================================================================
   Image Magnifier & Lightbox Tools (.enable-magnifier)
   ========================================================================== */

.enable-magnifier {
    position: relative !important;
}

/* Container for Image & Tools */
.enable-magnifier .et_pb_image_wrap,
.enable-magnifier > div,
.enable-magnifier > a {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
}

.enable-magnifier img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: initial !important;
}


/* Tools Action Bar (Top Right) */
.image-tools-bar {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 999 !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    pointer-events: auto !important;
}


/* Tool Buttons Base Style */
.image-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    user-select: none;
    -webkit-user-select: none;
}

.image-tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.image-tool-btn:active {
    transform: translateY(0);
}

.image-tool-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* 1. Magnifier Button (Orange #f06800) */
.magnifier-toggle-btn {
    background-color: #f06800;
    color: #ffffff;
}

.magnifier-toggle-btn:hover {
    background-color: #d85c00;
}

.magnifier-toggle-btn.is-active {
    background-color: #b84e00;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #f06800;
}

/* 2. Fullscreen / Lightbox Button (White with Dark Icon) */
.lightbox-toggle-btn {
    background-color: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e2e8f0;
}

.lightbox-toggle-btn:hover {
    background-color: #f8fafc;
    color: #000000;
}

/* Circular Magnifier Lens (Fixed to Viewport) */
.magnifier-lens {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 4px solid #f06800;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.15);
    pointer-events: none !important;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    background-repeat: no-repeat;
    background-color: #ffffff;
}

.magnifier-lens.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}


/* Custom Lightbox Modal Overlay */
.magnifier-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.magnifier-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.magnifier-modal-content {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magnifier-modal-img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.magnifier-modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.magnifier-modal-close:hover {
    color: #f06800;
    transform: scale(1.15);
}

