/* ── Download Gate Modal — MBA Karo Theme ── */

.dg-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.dg-overlay.dg-open { display: flex; }

/* Modal box — green top border */
.dg-modal {
    background: #fff;
    border-radius: 14px;
    border-top: 4px solid #1a4a2e;
    padding: 28px 28px 24px;
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,.22);
    animation: dg-slide-in .22s ease;
    max-height: 90vh;
    overflow-y: auto;
}
@keyframes dg-slide-in {
    from { opacity:0; transform:translateY(-14px) scale(.97); }
    to   { opacity:1; transform:translateY(0)     scale(1);   }
}

/* Close button — themed */
.dg-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: #1a4a2e;
    color: #c8f7c5;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.dg-close:hover { background: #0d3d18; }

/* Logo */
.dg-modal-logo { text-align: center; margin-bottom: 14px; }
.dg-modal-logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    display: inline-block;
}
.dg-modal-icon-fallback {
    width: 52px; height: 52px;
    background: #1a4a2e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto;
    color: #c8f7c5;
}

/* Title / Subtitle */
.dg-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a4a2e;
    text-align: center;
    margin-bottom: 5px;
    line-height: 1.3;
}
.dg-modal-sub {
    font-size: 12.5px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.55;
}

/* Divider under subtitle */
.dg-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0d5c1, transparent);
    margin-bottom: 18px;
}

/* Form rows */
.dg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

/* Form outer border */
.dg-form {
    border: 1.5px solid #c8d8c8;
    border-radius: 10px;
    padding: 16px;
    background: #f9fdf9;
    margin-bottom: 4px;
}

/* Field */
.dg-field-wrap { display: flex; flex-direction: column; gap: 4px; }
.dg-field-wrap label {
    font-size: 11.5px;
    font-weight: 600;
    color: #374151;
    letter-spacing: .02em;
}
.dg-req { color: #c62828; }

/* Inputs — themed border */
.dg-field-wrap input,
.dg-field-wrap select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #c8d8c8;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #ffffff;
    color: #2d2d2d;
    transition: border-color .15s, box-shadow .15s, background .15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.dg-field-wrap select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a4a2e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.dg-field-wrap input:focus,
.dg-field-wrap select:focus {
    outline: none;
    border-color: #1a4a2e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,74,46,.12);
}
.dg-field-wrap input:hover,
.dg-field-wrap select:hover {
    border-color: #1a4a2e;
}
.dg-field-wrap input.dg-invalid {
    border-color: #c62828;
    background: #fff8f8;
    box-shadow: 0 0 0 3px rgba(198,40,40,.1);
}

/* Error */
.dg-err { font-size: 11px; color: #c62828; min-height: 14px; line-height: 1.3; }

/* Submit wrapper — centered */
.dg-submit-wrap {
    display: flex;
    justify-content: center;
    margin-top: 6px;
    margin-bottom: 2px;
}
.dg-submit {
    width: 55%;
    padding: 12px 24px;
    background: #1a4a2e;
    color: #c8f7c5;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .03em;
    text-align: center;
    box-shadow: 0 4px 14px rgba(26,74,46,.3);
}
.dg-submit:hover:not(:disabled) {
    background: #0d3d18;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26,74,46,.35);
}
.dg-submit:active { transform: translateY(0); }
.dg-submit:disabled { background: #9ca3af; cursor: not-allowed; box-shadow: none; }

/* Privacy */
.dg-privacy { font-size: 11px; color: #9ca3af; text-align: center; margin-top: 10px; }

/* Success */
.dg-success { text-align: center; padding: 16px 0 8px; }
.dg-success-icon {
    width: 58px; height: 58px;
    background: #2e7d32;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 14px;
    animation: dg-pop .3s ease;
}
@keyframes dg-pop {
    from { transform:scale(.5); opacity:0; }
    to   { transform:scale(1);  opacity:1; }
}
.dg-success-msg {
    font-size: 14px;
    color: #1b5e20;
    font-weight: 500;
    line-height: 1.6;
}
.dg-success-link {
    display: inline-block;
    margin-top: 12px;
    padding: 9px 20px;
    background: #1a4a2e;
    color: #c8f7c5;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.dg-success-link:hover { background: #0d3d18; color: #c8f7c5; }

/* Mobile */
@media (max-width:520px) {
    .dg-modal        { padding: 22px 16px 20px; border-radius: 12px; }
    .dg-form-row     { grid-template-columns: 1fr; gap: 10px; }
    .dg-modal-title  { font-size: 16px; }
    .dg-modal-sub    { font-size: 12px; }
    .dg-submit       { width: 75%; font-size: 13px; }
    .dg-modal-logo img { width: 58px; height: 58px; }
}
