/**
 * TMU Free Guide Modal & Lead Generation Form Widget
 * Tony Manshino University Design System
 */

/* Root & Typography */
.tmu-guide-widget-root {
    box-sizing: border-box;
    font-family: var(--tmu-font-body, 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif);
}

/* Trigger Button */
.tmu-guide-btn-wrapper {
    display: flex;
    width: 100%;
}

.tmu-guide-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #df9724;
    color: #0c1834;
    border: 1.5px solid #0c1834;
    padding: 13px 28px;
    font-family: var(--tmu-font-body, 'Bricolage Grotesque', sans-serif);
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.22s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    box-sizing: border-box;
}

.tmu-guide-trigger-btn:hover {
    background-color: #cf8817;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(223, 151, 36, 0.28);
}

.tmu-guide-trigger-btn svg {
    transition: transform 0.2s ease;
}

.tmu-guide-trigger-btn:hover svg {
    transform: translateX(4px);
}

/* Modal Backdrop */
.tmu-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(12, 24, 52, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.tmu-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* Modal Dialog Box */
.tmu-modal-container {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 16px;
    padding: 38px 32px 34px;
    box-shadow: 0 24px 60px -10px rgba(12, 24, 52, 0.25), 0 10px 20px -5px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    transform: scale(0.94) translateY(10px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.tmu-modal-backdrop.is-open .tmu-modal-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.tmu-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.tmu-modal-close:hover {
    color: #0c1834;
    background: #f1f5f9;
}

/* Modal Header */
.tmu-modal-header {
    margin-bottom: 24px;
}

.tmu-modal-title {
    font-family: var(--tmu-font-heading, 'Bricolage Grotesque', sans-serif);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.15;
}

.tmu-modal-subtitle {
    font-size: 15px;
    font-weight: 400;
    color: #4b5563;
    margin: 0;
    line-height: 1.45;
}

/* Form Groups */
.tmu-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.tmu-form-label {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.tmu-select-wrap {
    position: relative;
    width: 100%;
}

/* Guide & Language Dual Select Row */
.tmu-guide-select-row {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.tmu-select-guide-wrap {
    flex: 1 1 64%;
    min-width: 0;
}

.tmu-select-language-wrap {
    flex: 0 0 36%;
    min-width: 110px;
}

.tmu-select-language-wrap .tmu-form-select {
    padding-right: 32px;
    padding-left: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.tmu-select-language-wrap .tmu-select-arrow {
    right: 12px;
}

@media (max-width: 440px) {
    .tmu-guide-select-row {
        flex-direction: column;
        gap: 10px;
    }
    .tmu-select-guide-wrap,
    .tmu-select-language-wrap {
        flex: 1 1 100%;
        width: 100%;
    }
}

.tmu-form-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 13px 40px 13px 16px;
    font-size: 14.5px;
    color: #1f2937;
    font-family: inherit;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tmu-form-select:focus,
.tmu-form-input:focus {
    outline: none;
    border-color: #0c1834;
    box-shadow: 0 0 0 3px rgba(12, 24, 52, 0.08);
}

.tmu-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
}

.tmu-form-input {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 14.5px;
    color: #1f2937;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tmu-form-input::placeholder {
    color: #9ca3af;
}

/* Marketing Checkbox */
.tmu-form-group-checkbox {
    margin: 22px 0 24px;
    text-align: left;
}

.tmu-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.tmu-custom-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.tmu-checkbox-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: #ffffff;
    border: 1.8px solid #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.tmu-checkbox-box svg {
    width: 13px;
    height: 13px;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.tmu-custom-checkbox:checked+.tmu-checkbox-box {
    background-color: #111827;
    border-color: #111827;
}

.tmu-custom-checkbox:checked+.tmu-checkbox-box svg {
    opacity: 1;
}

.tmu-checkbox-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.45;
    font-weight: 500;
}

/* Submit Button */
.tmu-modal-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background-color: #df9724;
    color: #0c1834;
    border: 1.5px solid #0c1834;
    border-radius: 8px;
    padding: 14px 24px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.22s ease-in-out;
    box-sizing: border-box;
}

.tmu-modal-submit-btn:hover {
    background-color: #cf8817;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(223, 151, 36, 0.3);
}

.tmu-modal-submit-btn svg {
    transition: transform 0.2s ease;
}

.tmu-modal-submit-btn:hover svg {
    transform: translateX(4px);
}

.tmu-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(12, 24, 52, 0.25);
    border-top-color: #0c1834;
    border-radius: 50%;
    animation: tmu-spin 0.7s linear infinite;
}

@keyframes tmu-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Banner */
.tmu-form-error-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    margin-bottom: 16px;
    text-align: left;
}

/* Privacy Note */
.tmu-modal-privacy-note {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
    margin: 18px 0 0 0;
    text-align: left;
}

/* ==========================================================================
   SCREEN 2: Success / Download State (Screen 3 in screenshot)
   ========================================================================== */
.tmu-modal-screen-success {
    text-align: left;
    animation: tmu-fade-in 0.3s ease;
}

@keyframes tmu-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tmu-success-top-badge {
    margin-bottom: 12px;
}

.tmu-badge-done {
    display: inline-block;
    background-color: #0e6853;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 5px 14px;
    border-radius: 6px;
    text-transform: uppercase;
}

.tmu-success-guide-tag {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 500;
}

.tmu-success-title {
    font-family: var(--tmu-font-heading, 'Bricolage Grotesque', sans-serif);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #071f40;
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.tmu-success-guide-subtitle {
    font-size: 14.5px;
    color: #4b5563;
    margin: 0 0 24px 0;
}

.tmu-success-btn-wrap {
    margin-bottom: 24px;
}

.tmu-modal-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background-color: #df9724;
    color: #0c1834;
    border: 1.5px solid #0c1834;
    border-radius: 8px;
    padding: 14px 24px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.22s ease-in-out;
    box-sizing: border-box;
}

.tmu-modal-download-btn:hover {
    background-color: #cf8817;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(223, 151, 36, 0.3);
}

.tmu-modal-download-btn svg {
    transition: transform 0.2s ease;
}

.tmu-modal-download-btn:hover svg {
    transform: translateX(4px);
}

.tmu-success-footer-notes {
    font-size: 13.5px;
    color: #4b5563;
    line-height: 1.5;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
}

.tmu-success-email-notice {
    margin: 0 0 8px 0;
}

.tmu-success-marketing-notice {
    margin: 0;
    color: #6b7280;
}

/* Mobile Responsiveness */
@media (max-width: 540px) {
    .tmu-modal-container {
        padding: 30px 22px 26px;
    }

    .tmu-modal-title {
        font-size: 25px;
    }

    .tmu-success-title {
        font-size: 22px;
    }
}