/* BlueGrid Popup - Frontend Styles */

/* Inline popup-trigger link (added inside post content) */
a.bgp-trigger {
    cursor: pointer;
}


/* Overlay */
.bgp-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.bgp-overlay.bgp-visible {
    opacity: 1;
}

/* Popup container */
.bgp-popup {
    position: relative;
    display: flex;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(30px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bgp-overlay.bgp-visible .bgp-popup {
    transform: translateY(0) scale(1);
}

/* Close button */
.bgp-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.bgp-close:hover {
    background: #333;
    transform: scale(1.1);
}

/* Text panel */
.bgp-text-panel {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.bgp-title {
    font-family: 'Inria Sans', sans-serif;
    font-size: 50px;
    font-weight: 700;
    line-height: 1.15;
    color: #000000;
    margin: 0 0 8px;
}
.bgp-subtitle {
    font-family: 'Inria Sans', sans-serif;
    font-size: 24px;
    font-weight: 300;
    line-height: 1.5;
    color: #000000;
    margin: 0 0 24px;
}

.bgp-text-content {
    margin-bottom: 24px;
}
.bgp-text-content h1,
.bgp-text-content h2,
.bgp-text-content h3 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    color: #111;
    margin: 0 0 16px;
}
.bgp-text-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 8px;
}

/* Image panel */
.bgp-image-panel {
    flex: 0 0 45%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    min-height: 400px;
}
.bgp-layout-text-image .bgp-image-panel {
    justify-content: flex-end;
}
.bgp-layout-image-text .bgp-image-panel {
    justify-content: flex-start;
}
.bgp-popup-img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Form */
.bgp-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.bgp-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #c8cfe0;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.bgp-input:focus {
    border-color: #2946FF;
}
.bgp-input::placeholder {
    color: #aab;
}
.bgp-input.bgp-input-error {
    border-color: #e53e3e;
}

.bgp-shortcode-form {
    margin-bottom: 20px;
}

/* Actions */
.bgp-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.bgp-dismiss {
    font-family: 'Inria Sans', sans-serif;
    color: rgba(0, 0, 0, 0.7);
    text-decoration: underline !important;
    font-size: 22px;
    font-weight: 400;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}
.bgp-dismiss:hover {
    color: rgba(0, 0, 0, 0.85);
    text-decoration: underline !important;
}
.bgp-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    font-family: inherit;
}
.bgp-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.bgp-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.bgp-cta-arrow {
    font-size: 18px;
}

/* Form message */
.bgp-form-message {
    margin-top: 12px;
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 6px;
}
.bgp-form-message.bgp-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.bgp-form-message.bgp-msg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Text-only layout */
.bgp-layout-text-only .bgp-text-panel {
    max-width: 600px;
    margin: 0 auto;
}

/* =================== Responsive =================== */

@media (max-width: 768px) {
    .bgp-overlay {
        padding: 12px;
        align-items: center;
    }

    .bgp-popup {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
    }

    .bgp-image-panel {
        display: none;
    }

    .bgp-text-panel {
        padding: 30px 24px;
    }
    .bgp-title {
        font-size: 32px;
    }
    .bgp-subtitle {
        font-size: 18px;
    }
    .bgp-text-content h1,
    .bgp-text-content h2,
    .bgp-text-content h3 {
        font-size: 26px;
    }
    .bgp-text-content p {
        font-size: 14px;
    }

    .bgp-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .bgp-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .bgp-cta {
        justify-content: center;
    }
    .bgp-dismiss {
        text-align: center;
    }
}
