/* ============================================================
   STONEGATE SUBSCRIBE — Modal Styles (pixel-matched to design)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ------ TRIGGER BUTTON ------ */
.stonegate-subscribe-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    background: #003d82;
    color: #fff;
    border: none;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.12s ease;
    letter-spacing: 0.01em;
}

.stonegate-subscribe-trigger:hover {
    background: #002f66;
    transform: translateY(-1px);
}

.stonegate-subscribe-trigger:active {
    transform: translateY(0);
}

/* ------ OVERLAY ------ */
.stonegate-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 50, 0.65);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.stonegate-overlay.is-open {
    display: flex;
}

/* ------ MODAL BOX — dark navy card ------ */
.stonegate-modal {
    background: #074B85;
    border-radius: 14px;
    box-shadow: 0 32px 80px rgba(0, 10, 40, 0.55);
    width: 100%;
    max-width: 420px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    padding: 36px 32px 32px;
    font-family: 'DM Sans', sans-serif;
    animation: sg-slide-up 0.22s ease;
}

@keyframes sg-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ------ CLOSE BUTTON ------ */
.stonegate-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: black !important;
background-color: white !important;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.stonegate-modal-close:hover {
    color: #fff;
}

/* ------ HEADER ------ */
.stonegate-modal-header {
    margin-bottom: 22px;
	text-align: center;
}

.stonegate-modal-header h2 {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.25;
    font-family: 'DM Sans', sans-serif;
    background: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.stonegate-modal-header p {
    font-size: 14px;
    color: rgba(255,255,255,0.78);
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
}

/* ------ FORM LAYOUT ------ */
.stonegate-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.stonegate-field {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 12px;
}

/* Section label above dropdown */
.sg-field-label {
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    font-family: 'DM Sans', sans-serif !important;
    margin-bottom: 7px;
    display: block;
}

/* ------ INPUTS ------ */
.stonegate-field input[type="text"],
.stonegate-field input[type="email"] {
    border: none;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: #222;
    background: #fff;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.15s;
    font-weight: 400;
    margin: 0;
}

.stonegate-field input[type="text"]::placeholder,
.stonegate-field input[type="email"]::placeholder {
    color: #aab0bb;
    font-family: 'DM Sans', sans-serif;
}

.stonegate-field input[type="text"]:focus,
.stonegate-field input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.stonegate-field input.sg-error {
    box-shadow: 0 0 0 3px rgba(255, 90, 70, 0.55);
}

/* ------ SECTOR DROPDOWN ------ */
.sg-dropdown-wrapper {
    position: relative;
}

.sg-dropdown-selected {
    background: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 38px 12px 14px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: #222;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    position: relative;
    transition: box-shadow 0.15s;
    font-weight: 400;
    min-height: 46px;
    box-sizing: border-box;
}

.sg-dropdown-selected.sg-error {
    box-shadow: 0 0 0 3px rgba(255, 90, 70, 0.55);
}

/* Chevron icon */
.sg-dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #666;
    pointer-events: none;
    transition: transform 0.18s ease;
}

.sg-dropdown-wrapper.is-open .sg-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Dropdown list */
.sg-dropdown-list {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.22);
    z-index: 200;
    overflow: hidden;
    padding: 4px 0;
}

.sg-dropdown-wrapper.is-open .sg-dropdown-list {
    display: block;
}

.sg-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 2px 0px 5px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
    font-weight: 400;
}

.sg-dropdown-item:hover {
    background: #f0f5ff;
}

.sg-dropdown-item.is-selected {
    font-weight: 600;
    color: #1b3f74;
}

/* Checkmark for selected item */
.sg-item-check {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #1b3f74;
    opacity: 0;
    transition: opacity 0.12s;
}

.sg-dropdown-item.is-selected .sg-item-check {
    opacity: 1;
}

/* "All Sectors" separator line below it */
.sg-dropdown-item.sg-all-item {
    border-bottom: 1px solid #eef0f4;
    font-weight: 600;
    color: #1b3f74;
    padding-bottom: 11px;
    margin-bottom: 2px;
}

/* ------ ERROR MESSAGE ------ */
.stonegate-error {
    background: rgba(200, 40, 40, 0.18);
    border: 1px solid rgba(220, 80, 80, 0.4);
    border-radius: 8px;
    color: #ffb0a8;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    padding: 10px 14px;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* ------ SUBMIT BUTTON ------ */
.stonegate-submit {
    width: 100% !important;
    background-color: #fff !important;
    color: #1b3f74 !important;
    border: none;
    border-radius: 8px !important;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.01em;
}

.stonegate-submit:hover:not(:disabled) {
    background: #161616 !important;
	
	color: white !important;
}

.stonegate-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sg-spinner {
    animation: sg-spin 0.8s linear infinite;
}

@keyframes sg-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ------ SUCCESS STATE ------ */
.stonegate-success {
    text-align: center;
    padding: 20px 0 8px;
}

.sg-success-icon {
    margin-bottom: 16px;
}

.stonegate-success h3 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    font-family: 'DM Sans', sans-serif;
}

.stonegate-success p {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin: 0;
    font-family: 'DM Sans', sans-serif;
}

/* ------ MOBILE ------ */
@media (max-width: 480px) {
    .stonegate-modal {
        padding: 28px 20px 24px;
        border-radius: 12px;
    }

    .stonegate-row {
        grid-template-columns: 1fr;
    }

    .stonegate-modal-header h2 {
        font-size: 19px;
    }
}