/* Digion Popup — matches hellodose.com HubSpot popup style */

/* Honeypot field — visually hidden, inaccessible to humans */
.dg-popup-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    tab-index: -1;
}

.dg-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dgPopupFadeIn 0.3s ease;
}

@keyframes dgPopupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dg-popup-modal {
    position: relative;
    max-width: 640px;
    width: 90%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: dgPopupSlideUp 0.35s ease;
    font-family: inherit;
}

@keyframes dgPopupSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.dg-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 10;
    background: none;
    border: none;
    font-size: 24px;
    color: #0a0a0a;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: opacity 0.2s;
}
.dg-popup-close:hover { opacity: 0.6; }

.dg-popup-body {
    display: flex;
}

.dg-popup-content {
    flex: 1;
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dg-popup-image {
    width: 300px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: #f0eeeb;
}
.dg-popup-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
}

.dg-popup-title {
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    color: #0a0a0a;
    line-height: 1.3;
    margin: 0 0 4px;
}

.dg-popup-subtitle {
    font-family: inherit;
    font-size: 12px;
    color: #555;
    margin: 0 0 14px;
    line-height: 1.5;
    font-weight: 500;
}

.dg-popup-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dg-popup-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    font-weight: 600;
    color: #0a0a0a;
    font-family: inherit;
}

.dg-popup-label input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
    outline: none;
}
.dg-popup-label input::placeholder {
    color: #999;
}
.dg-popup-label input:focus {
    border-color: #3B5E5E;
}
.dg-popup-label.invalid input {
    border-color: #E22323;
}

.dg-required { color: #E22323; }

.dg-popup-submit {
    width: auto;
    align-self: flex-start;
    padding: 10px 28px;
    background: #1C2D3E;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 6px;
}
.dg-popup-submit:hover {
    background: #2a3f54;
}
.dg-popup-submit.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dg-popup-success {
    text-align: center;
    padding: 20px 0;
}
.dg-popup-success h3 {
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    color: #0a0a0a;
    margin: 0 0 8px;
}
.dg-popup-success p {
    font-family: inherit;
    font-size: 13px;
    color: #555;
    font-weight: 500;
    margin: 0;
}

/* Mobile */
@media (max-width: 600px) {
    .dg-popup-modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    .dg-popup-body {
        flex-direction: column-reverse;
    }
    .dg-popup-image {
        width: 100%;
        height: 160px;
        justify-content: center;
    }
    .dg-popup-image img {
        height: 100%;
        width: auto;
    }
    .dg-popup-content {
        padding: 20px 16px;
    }
    .dg-popup-title {
        font-size: 18px;
    }
}
