/* OLA Tools Popup */
.ola-tools-floating-button {
    position: fixed;
    bottom: 24px;
    z-index: 999990;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: var(--ola-tools-button, #111);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0,0,0,.25);
    transition: transform .18s ease, box-shadow .18s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ola-tools-floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px rgba(0,0,0,.30);
}
.ola-tools-right { right: 24px; }
.ola-tools-left { left: 24px; }
.ola-tools-icon { font-size: 16px; }

.ola-tools-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ola-tools-modal[hidden] { display: none; }

.ola-tools-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(3px);
}

.ola-tools-dialog {
    position: relative;
    width: min(95vw, 1500px);
    height: min(92vh, 950px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.ola-tools-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 16px;
    border-bottom: 1px solid #e7e7e7;
    background: #fff;
}
.ola-tools-title { font-size: 18px; font-weight: 800; line-height: 1.2; }
.ola-tools-subtitle { margin-top: 2px; font-size: 12px; color: #777; }
.ola-tools-header-actions { display: flex; align-items: center; gap: 8px; }
.ola-tools-new-tab {
    border: 1px solid #ddd;
    background: #fff;
    color: #222;
    border-radius: 7px;
    padding: 8px 11px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    touch-action: manipulation;
}
.ola-tools-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: #f1f1f1;
    color: #222;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}

.ola-tools-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    padding: 7px 8px;
    overflow-x: auto;
    background: #171717;
}
.ola-tools-tab {
    flex: 1 1 0;
    min-width: 150px;
    border: 0;
    border-radius: 7px;
    padding: 11px 14px;
    background: transparent;
    color: #ddd;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.ola-tools-tab:hover { background: rgba(255,255,255,.08); color: #fff; }
.ola-tools-tab.is-pressing { background: rgba(255,255,255,.18); }
.ola-tools-tab.is-active {
    background: var(--ola-tools-accent, #f39c12);
    color: #111;
}
.ola-tools-tab:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.ola-tools-tab-badge {
    margin-left: 4px;
    font-size: 11px;
    opacity: .75;
}

.ola-tools-content {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #f6f6f6;
}
.ola-tools-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}
.ola-tools-panel[hidden] { display: none; }
.ola-tools-iframe {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    border: 0;
    background: #fff;
}
.ola-tools-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f6f6f6;
    color: #555;
    font-size: 14px;
    pointer-events: none;
}
.ola-tools-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-top-color: var(--ola-tools-accent, #f39c12);
    border-radius: 50%;
    animation: ola-tools-spin .8s linear infinite;
}
.ola-tools-panel.is-loaded .ola-tools-loading { display: none; }
.ola-tools-fallback {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: #fff;
}
.ola-tools-fallback[hidden] { display: none; }
.ola-tools-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px;
    text-align: center;
    color: #666;
}

body.ola-tools-modal-open { overflow: hidden; }

.ola-tools-shortcode-button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: var(--ola-tools-button, #111);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

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

@media (max-width: 700px) {
    .ola-tools-floating-button {
        right: 14px;
        bottom: 14px;
        padding: 11px 14px;
    }
    .ola-tools-left { left: 14px; right: auto; }
    .ola-tools-dialog {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    .ola-tools-header { padding: 9px 10px; }
    .ola-tools-subtitle { display: none; }
    .ola-tools-new-tab { padding: 7px 9px; }
    .ola-tools-tab {
        min-width: 125px;
        padding: 10px 9px;
        font-size: 12px;
    }
}


.ola-tools-browser-launch {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    text-align: center;
    background: #fff;
}
.ola-tools-browser-icon { font-size: 44px; line-height: 1; }
.ola-tools-browser-launch h3 { margin: 0; font-size: 22px; }
.ola-tools-browser-launch p { margin: 0 0 8px; color: #666; }
.ola-tools-browser-button {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 8px;
    background: var(--ola-tools-accent, #f39c12);
    color: #111;
    text-decoration: none;
    font-weight: 700;
}
