/*
 * Demo Preview Styles - Modern Redesign
 */

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: #f1f5f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Demo Header Wrapper */
.ads-demo-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    z-index: 99999;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

/* Left Section: Brand & Navigation */
.ads-demo-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ads-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.ads-logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 173, 239, 0.2));
}

.ads-brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.ads-brand-name span {
    color: #00adef;
    margin-left: 2px;
}

.ads-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
}

.ads-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ads-back-btn:hover {
    color: #00adef;
    background: rgba(0, 173, 239, 0.05);
}

/* Center Section: Viewport Switcher */
.ads-demo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.ads-device-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 14px;
    position: relative;
    border: 1px solid #e2e8f0;
}

.ads-device-btn {
    width: 48px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    color: #94a3b8;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.ads-device-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.ads-device-btn.active {
    color: #00adef;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ads-device-btn:hover:not(.active) {
    color: #475569;
}

/* Right Section: Code & Buy Button */
.ads-demo-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ads-product-code {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
}

.ads-code-label {
    font-weight: 500;
    color: #64748b;
}

.ads-code-value {
    font-weight: 700;
    color: #0f172a;
}

.ads-buy-btn {
    background: linear-gradient(135deg, #00adef 0%, #0072bc 100%);
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 173, 239, 0.3);
}

.ads-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 173, 239, 0.4);
    filter: brightness(1.1);
}

.ads-buy-btn svg {
    transition: transform 0.3s ease;
}

.ads-buy-btn:hover svg {
    transform: translateX(3px);
}

/* iframe Wrapper */
.iframe-wrapper {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    background: #f1f5f9;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    background: #fff;
}

/* Device Sizes */
.is-tablet iframe {
    width: 768px;
    height: calc(100% - 60px);
    margin-top: 30px;
    border-radius: 20px;
    border: 12px solid #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.is-mobile iframe {
    width: 375px;
    height: calc(100% - 60px);
    margin-top: 30px;
    border-radius: 30px;
    border: 12px solid #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}


/* Toggle Bar Button */
.ads-toggle-bar {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-top: none;
    border-radius: 0 0 12px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100000;
    padding: 0;
}

.ads-toggle-bar:hover {
    height: 28px;
    bottom: -28px;
    color: #00adef;
    background: #ffffff;
}

.ads-toggle-bar .icon-down {
    display: none;
}

/* Hidden States */
.ads-bar-hidden .ads-demo-bar {
    transform: translateY(-100%);
}

.ads-bar-hidden .ads-toggle-bar .icon-up {
    display: none;
}

.ads-bar-hidden .ads-toggle-bar .icon-down {
    display: block;
}

.ads-bar-hidden .iframe-wrapper {
    top: 0;
}

.ads-demo-bar {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .ads-demo-center {
        display: none;
    }

    .ads-divider {
        display: none;
    }

    .ads-demo-bar {
        padding: 0 16px;
    }

    .ads-brand-name {
        font-size: 18px;
    }

    .ads-toggle-bar {
        bottom: -24px;
    }
}

@media (max-width: 768px) {

    .ads-back-btn span,
    .ads-product-code {
        display: none;
    }

    .ads-buy-btn span {
        display: none;
    }

    .ads-buy-btn {
        padding: 12px;
    }
}