/* ============================================================
   Meta Ads Onboarding – Stylesheet
   Architekci Biznesu | Lighter violet theme
   ============================================================ */

:root {
    --mao-primary:       #7C3AED;
    --mao-primary-light: #A78BFA;
    --mao-primary-pale:  #EDE9FE;
    --mao-primary-dark:  #5B21B6;
    --mao-accent:        #9B59B6;
    --mao-bg:            #F8F6FF;
    --mao-white:         #FFFFFF;
    --mao-text:          #1E1B4B;
    --mao-text-muted:    #6B7280;
    --mao-border:        #DDD6FE;
    --mao-border-focus:  #7C3AED;
    --mao-error:         #EF4444;
    --mao-error-bg:      #FEF2F2;
    --mao-success:       #10B981;
    --mao-success-bg:    #ECFDF5;
    --mao-warning:       #F59E0B;
    --mao-warning-bg:    #FFFBEB;
    --mao-info-bg:       #F0EDFF;
    --mao-radius:        12px;
    --mao-radius-sm:     8px;
    --mao-shadow:        0 4px 24px rgba(124, 58, 237, 0.10);
    --mao-shadow-card:   0 2px 12px rgba(124, 58, 237, 0.08);
    --mao-transition:    all 0.25s ease;
}

/* ── Hide WordPress page title on form pages ─────────────── */
.mao-form-page-wrap .entry-title,
.mao-form-page-wrap .page-title,
.mao-form-page-wrap > h1:first-child,
.mao-form-page-wrap .wp-block-post-title,
body.page .mao-wrapper-outer .entry-title,
body.page .mao-wrapper-outer .page-title {
    display: none !important;
}

/* ── Service Banner ──────────────────────────────────────── */
.mao-service-banner {
    max-width: 760px;
    margin: 30px auto 0;
    padding: 14px 28px;
    border-radius: var(--mao-radius) var(--mao-radius) 0 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
}
.mao-service-banner .mao-sb-icon {
    font-size: 28px;
    line-height: 1;
}
.mao-service-banner .mao-sb-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mao-service-banner .mao-sb-label {
    font-size: 11px;
    font-weight: 500;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.mao-service-banner .mao-sb-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.2px;
}
.mao-service-banner + .mao-wrapper {
    margin-top: 0;
    border-radius: 0 0 var(--mao-radius) var(--mao-radius);
}

/* ── Wrapper ──────────────────────────────────────────────── */

.mao-wrapper {
    max-width: 760px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
    color: var(--mao-text);
    background: var(--mao-bg);
    border-radius: var(--mao-radius);
    box-shadow: var(--mao-shadow);
    overflow: hidden;
}

/* ── Progress bar ─────────────────────────────────────────── */

.mao-progress-wrap {
    background: linear-gradient(135deg, var(--mao-primary) 0%, var(--mao-accent) 100%);
    padding: 24px 32px 20px;
}

.mao-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-bottom: 14px;
}

.mao-progress-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: rgba(255,255,255,0.25);
    z-index: 0;
}

.mao-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    cursor: default;
}

.mao-step-dot span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: var(--mao-transition);
}

.mao-step-dot small {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.mao-step-dot.active span,
.mao-step-dot.completed span {
    background: var(--mao-white);
    border-color: var(--mao-white);
    color: var(--mao-primary);
}

.mao-step-dot.active small {
    color: var(--mao-white);
    font-weight: 700;
}

.mao-step-dot.completed span::after {
    content: '✓';
}

.mao-step-dot.completed span {
    font-size: 0;
}

.mao-step-dot.completed span::after {
    font-size: 16px;
}

.mao-progress-bar {
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
}

.mao-progress-fill {
    height: 100%;
    background: var(--mao-white);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* ── Sections ─────────────────────────────────────────────── */

.mao-section {
    display: none;
    padding: 32px 32px 24px;
    background: var(--mao-white);
    animation: maoFadeIn 0.3s ease;
}

.mao-section.active {
    display: block;
}

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

/* ── Section header ───────────────────────────────────────── */

.mao-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--mao-primary-pale);
}

.mao-section-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    background: var(--mao-primary-pale);
    border-radius: var(--mao-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mao-section-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: var(--mao-primary-dark);
}

.mao-section-header p {
    margin: 0;
    color: var(--mao-text-muted);
    font-size: 14px;
}

/* ── Fields ───────────────────────────────────────────────── */

.mao-field {
    margin-bottom: 22px;
}

.mao-field label:not(.mao-radio):not(.mao-checkbox) {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--mao-text);
    margin-bottom: 8px;
}

.mao-field .req {
    color: var(--mao-error);
}

/* ── Inputs ───────────────────────────────────────────────── */

.mao-wrapper input[type="text"],
.mao-wrapper input[type="email"],
.mao-wrapper input[type="url"],
.mao-wrapper input[type="tel"],
.mao-wrapper input[type="number"],
.mao-wrapper textarea,
.mao-wrapper select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--mao-border);
    border-radius: var(--mao-radius-sm);
    font-size: 15px;
    color: var(--mao-text);
    background: var(--mao-white);
    transition: var(--mao-transition);
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
}

.mao-wrapper input:focus,
.mao-wrapper textarea:focus {
    border-color: var(--mao-border-focus);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.mao-wrapper input.mao-invalid,
.mao-wrapper textarea.mao-invalid {
    border-color: var(--mao-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}

.mao-wrapper textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

/* ── Input with suffix ────────────────────────────────────── */

.mao-input-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.mao-input-prefix input {
    padding-right: 60px;
}

.mao-input-suffix {
    position: absolute;
    right: 16px;
    font-weight: 600;
    color: var(--mao-primary);
    font-size: 14px;
    pointer-events: none;
}

/* ── Hint ─────────────────────────────────────────────────── */

.mao-hint {
    display: block;
    font-size: 12px;
    color: var(--mao-text-muted);
    margin-top: 6px;
}

/* ── Radio group ──────────────────────────────────────────── */

.mao-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mao-radio {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
}

.mao-radio input[type="radio"] {
    display: none;
    width: auto;
}

.mao-radio span {
    padding: 10px 18px;
    border: 2px solid var(--mao-border);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--mao-text);
    background: var(--mao-white);
    transition: var(--mao-transition);
    white-space: nowrap;
    user-select: none;
}

.mao-radio input[type="radio"]:checked + span {
    border-color: var(--mao-primary);
    background: var(--mao-primary);
    color: var(--mao-white);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.mao-radio:hover span {
    border-color: var(--mao-primary-light);
    background: var(--mao-primary-pale);
}

.mao-radio input[type="radio"]:checked + span:hover {
    background: var(--mao-primary);
    color: var(--mao-white);
}

/* ── Checkbox group ───────────────────────────────────────── */

.mao-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mao-checkbox {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
}

.mao-checkbox input[type="checkbox"] {
    display: none;
    width: auto;
}

.mao-checkbox span {
    padding: 10px 18px;
    border: 2px solid var(--mao-border);
    border-radius: var(--mao-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--mao-text);
    background: var(--mao-white);
    transition: var(--mao-transition);
    user-select: none;
}

.mao-checkbox input[type="checkbox"]:checked + span {
    border-color: var(--mao-primary);
    background: var(--mao-primary-pale);
    color: var(--mao-primary-dark);
}

.mao-checkbox:hover span {
    border-color: var(--mao-primary-light);
    background: var(--mao-primary-pale);
}

/* ── Consent checkboxes ───────────────────────────────────── */

.mao-consent {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.mao-consent input[type="checkbox"] {
    display: block !important;
    width: 20px !important;
    min-width: 20px;
    height: 20px;
    margin: 2px 0 0;
    border: 2px solid var(--mao-border);
    border-radius: 4px;
    appearance: auto;
    -webkit-appearance: auto;
    cursor: pointer;
    accent-color: var(--mao-primary);
}

.mao-consent span {
    padding: 0;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--mao-text);
    font-weight: 400;
    line-height: 1.5;
}

.mao-consent span a {
    color: var(--mao-primary);
    text-decoration: underline;
}

/* ── Info boxes ───────────────────────────────────────────── */

.mao-info-box {
    display: flex;
    gap: 14px;
    background: var(--mao-info-bg);
    border: 1px solid var(--mao-border);
    border-left: 4px solid var(--mao-primary);
    border-radius: var(--mao-radius-sm);
    padding: 16px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--mao-text);
}

.mao-info-steps {
    flex-direction: column;
    gap: 10px;
}

.mao-info-steps ol {
    margin: 10px 0 0;
    padding-left: 20px;
    line-height: 1.8;
}

.mao-info-steps code,
.mao-partner-id {
    display: inline-block;
    background: var(--mao-white);
    border: 2px dashed var(--mao-primary);
    color: var(--mao-primary-dark);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 6px 0;
}

.mao-info-warning {
    background: var(--mao-warning-bg);
    border-left-color: var(--mao-warning);
}

.mao-info-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1.4;
}

/* ── Conditional fields ───────────────────────────────────── */

.mao-conditional {
    display: none;
    animation: maoFadeIn 0.25s ease;
}

/* ── File upload ──────────────────────────────────────────── */

.mao-file-drop {
    position: relative;
    border: 2px dashed var(--mao-border);
    border-radius: var(--mao-radius-sm);
    padding: 28px 20px;
    text-align: center;
    background: var(--mao-bg);
    transition: var(--mao-transition);
    cursor: pointer;
}

.mao-file-drop:hover,
.mao-file-drop.drag-over {
    border-color: var(--mao-primary);
    background: var(--mao-primary-pale);
}

.mao-file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border: none;
    box-shadow: none;
}

.mao-file-drop-text {
    pointer-events: none;
}

.mao-file-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.mao-file-drop p {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 500;
    color: var(--mao-text);
}

.mao-file-drop small {
    color: var(--mao-text-muted);
    font-size: 12px;
}

.mao-file-link {
    color: var(--mao-primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.mao-file-list {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mao-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--mao-white);
    border: 1px solid var(--mao-border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--mao-text);
}

.mao-file-remove {
    background: none;
    border: none;
    color: var(--mao-error);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
}

/* ── Summary box ──────────────────────────────────────────── */

.mao-summary-box {
    background: var(--mao-primary-pale);
    border: 1px solid var(--mao-border);
    border-radius: var(--mao-radius-sm);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.mao-summary-box h3 {
    margin: 0 0 14px;
    font-size: 16px;
    color: var(--mao-primary-dark);
}

#mao-summary-content {
    font-size: 13px;
    line-height: 1.7;
    columns: 2;
    column-gap: 24px;
}

#mao-summary-content .mao-sum-row {
    break-inside: avoid;
    margin-bottom: 4px;
}

#mao-summary-content .mao-sum-label {
    color: var(--mao-text-muted);
    font-size: 12px;
}

#mao-summary-content .mao-sum-value {
    font-weight: 600;
    color: var(--mao-text);
}


/* ── Phone row (prefix select + number input side-by-side) ─────────────────── */
.mao-phone-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.mao-phone-row .mao-phone-prefix {
    width: 90px;
    flex-shrink: 0;
}
.mao-phone-row .mao-phone-number {
    flex: 1;
    min-width: 0;
}

/* ── Navigation buttons ───────────────────────────────────── */

.mao-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--mao-primary-pale);
}

.mao-btn {
    padding: 13px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--mao-transition);
    font-family: inherit;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mao-btn-back {
    background: var(--mao-white);
    color: var(--mao-text-muted);
    border: 2px solid var(--mao-border);
}

.mao-btn-back:hover {
    background: var(--mao-primary-pale);
    border-color: var(--mao-primary-light);
    color: var(--mao-primary);
}

.mao-btn-next {
    background: linear-gradient(135deg, var(--mao-primary) 0%, var(--mao-accent) 100%);
    color: var(--mao-white);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.30);
}

.mao-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.40);
}

.mao-btn-submit {
    background: linear-gradient(135deg, var(--mao-primary) 0%, var(--mao-accent) 100%);
    color: var(--mao-white);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.30);
    padding: 14px 36px;
    font-size: 16px;
}

.mao-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.40);
}

.mao-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ── Messages ─────────────────────────────────────────────── */

.mao-message {
    padding: 14px 18px;
    border-radius: var(--mao-radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 18px;
}

.mao-message.error {
    background: var(--mao-error-bg);
    color: var(--mao-error);
    border: 1px solid #FCA5A5;
}

.mao-message.success {
    background: var(--mao-success-bg);
    color: #065F46;
    border: 1px solid #6EE7B7;
}

/* ── Success screen ───────────────────────────────────────── */

.mao-success {
    background: var(--mao-white);
    text-align: center;
    padding: 60px 40px;
}

.mao-success-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: maoBounce 0.6s ease;
}

@keyframes maoBounce {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.1); }
    100% { transform: scale(1);   opacity: 1; }
}

.mao-success h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--mao-primary-dark);
    margin: 0 0 14px;
}

.mao-success p {
    font-size: 16px;
    color: var(--mao-text-muted);
    line-height: 1.6;
    margin: 0 auto 12px;
    max-width: 480px;
}

.mao-success-details {
    display: inline-block;
    background: var(--mao-primary-pale);
    border-radius: var(--mao-radius-sm);
    padding: 16px 28px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mao-primary-dark);
}

/* ── Validation error ─────────────────────────────────────── */

.mao-field-error {
    color: var(--mao-error);
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
    display: block;
}

/* ── Login gate ───────────────────────────────────────────── */

.mao-login-gate {
    padding: 0;
    background: var(--mao-white);
}

.mao-login-header {
    background: linear-gradient(135deg, var(--mao-primary) 0%, var(--mao-accent) 100%);
    padding: 36px 32px 28px;
    text-align: center;
    color: var(--mao-white);
}

.mao-login-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.mao-login-header h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--mao-white);
}

.mao-login-header p {
    margin: 0;
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}

.mao-login-body {
    padding: 28px 32px 36px;
}

.mao-login-hint {
    text-align: center;
    font-size: 13px;
    color: var(--mao-text-muted);
    margin: 16px 0 0;
}

.mao-login-hint a {
    color: var(--mao-primary);
    text-decoration: none;
    font-weight: 600;
}

.mao-link-btn {
    background: none;
    border: none;
    color: var(--mao-primary);
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-family: inherit;
}

/* ── Restore notice (subtle) ──────────────────────────────── */

.mao-restore-notice {
    background: var(--mao-success-bg);
    color: #065F46;
    border-bottom: 1px solid #6EE7B7;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* ── Session restore banner ───────────────────────────────── */

.mao-restore-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #F0EDFF, #EDE9FE);
    border: 2px solid var(--mao-primary-light);
    border-radius: var(--mao-radius) var(--mao-radius) 0 0;
    padding: 16px 24px;
    flex-wrap: wrap;
}

.mao-restore-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.mao-restore-text {
    flex: 1;
    min-width: 180px;
}

.mao-restore-text strong {
    display: block;
    font-size: 15px;
    color: var(--mao-primary-dark);
    margin-bottom: 3px;
}

.mao-restore-text small {
    color: var(--mao-text-muted);
    font-size: 13px;
}

.mao-restore-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.mao-btn-restore-yes {
    background: var(--mao-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--mao-transition);
}

.mao-btn-restore-yes:hover {
    background: var(--mao-primary-dark);
    transform: translateY(-1px);
}

.mao-btn-restore-no {
    background: transparent;
    color: var(--mao-text-muted);
    border: 2px solid var(--mao-border);
    border-radius: 50px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--mao-transition);
}

.mao-btn-restore-no:hover {
    border-color: var(--mao-error);
    color: var(--mao-error);
}

.mao-restore-link-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--mao-border);
    flex-wrap: wrap;
}

.mao-restore-link-label {
    font-size: 12px;
    color: var(--mao-text-muted);
    white-space: nowrap;
}

.mao-restore-link-input {
    flex: 1;
    min-width: 200px;
    padding: 6px 10px !important;
    font-size: 12px !important;
    color: var(--mao-primary-dark) !important;
    background: var(--mao-white) !important;
    border: 1px solid var(--mao-border) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

.mao-copy-link-btn {
    background: var(--mao-primary-pale);
    color: var(--mao-primary-dark);
    border: 1px solid var(--mao-border);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--mao-transition);
    white-space: nowrap;
}

.mao-copy-link-btn:hover {
    background: var(--mao-primary);
    color: #fff;
    border-color: var(--mao-primary);
}

/* ── Login tabs ───────────────────────────────────────────── */

.mao-login-tabs {
    display: flex;
    border-bottom: 2px solid var(--mao-border);
    margin: 0 0 24px;
    gap: 0;
}

.mao-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mao-text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: var(--mao-transition);
    text-align: center;
    line-height: 1.3;
}

.mao-tab:hover {
    color: var(--mao-primary);
    background: var(--mao-primary-pale);
    border-radius: 6px 6px 0 0;
}

.mao-tab.active {
    color: var(--mao-primary);
    border-bottom-color: var(--mao-primary);
    background: none;
}

.mao-tab-panel {
    display: none;
}

.mao-tab-panel.active {
    display: block;
    animation: maoFadeIn 0.2s ease;
}

/* ── Login sent confirmation ──────────────────────────────── */

#mao-login-sent {
    text-align: center;
    padding: 12px 0;
}

#mao-login-sent .mao-sent-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 14px;
}

#mao-login-sent h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--mao-primary-dark);
    margin: 0 0 10px;
}

#mao-login-sent p {
    font-size: 14px;
    color: var(--mao-text-muted);
    margin: 0 auto 6px;
    max-width: 340px;
    line-height: 1.6;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 680px) {
    .mao-wrapper {
        margin: 0;
        border-radius: 0;
    }

    .mao-progress-wrap {
        padding: 16px;
    }

    .mao-step-dot small {
        display: none;
    }

    .mao-section {
        padding: 20px 16px 16px;
    }

    .mao-section-header {
        gap: 12px;
    }

    .mao-section-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .mao-section-header h2 {
        font-size: 18px;
    }

    .mao-radio-group,
    .mao-checkbox-group {
        flex-direction: column;
    }

    .mao-radio span,
    .mao-checkbox span {
        width: 100%;
        box-sizing: border-box;
    }

    .mao-nav {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .mao-btn {
        width: 100%;
        justify-content: center;
    }

    #mao-summary-content {
        columns: 1;
    }
}

@media (max-width: 400px) {
    .mao-step-dot span {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .mao-progress-steps::before {
        top: 14px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   New field types (v1.4.0)
   ──────────────────────────────────────────────────────────────────────── */

/* Select dropdown */
.mao-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--mao-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--mao-text);
    background: #fff;
    cursor: pointer;
    transition: border-color .2s;
}
.mao-field select:focus { border-color: var(--mao-primary); outline: none; box-shadow: 0 0 0 3px rgba(124,58,237,.1); }

/* Telephone + prefix */
.mao-tel-prefix-group {
    display: flex;
    gap: 8px;
}
.mao-prefix-input {
    width: 84px !important;
    flex-shrink: 0;
    text-align: center;
}
.mao-tel-prefix-group input[type="tel"] { flex: 1; }

/* Checkbox group (multi-select) */
.mao-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.mao-checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--mao-text);
}
.mao-checkbox-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--mao-primary);
    flex-shrink: 0;
}
.mao-checkbox-option:hover span { color: var(--mao-primary); }

/* Repeater / table */
.mao-repeater { margin-top: 4px; }

.mao-repeater-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--mao-border);
}
.mao-repeater-table th {
    padding: 9px 12px;
    background: var(--mao-light);
    border-bottom: 1.5px solid var(--mao-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--mao-primary);
    text-align: left;
}
.mao-repeater-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--mao-border);
    border-right: 1px solid var(--mao-border);
    vertical-align: middle;
}
.mao-repeater-table td:last-child { border-right: none; width: 40px; text-align: center; }
.mao-repeater-table tr:last-child td { border-bottom: none; }
.mao-rep-input {
    width: 100%;
    border: none;
    padding: 5px 6px;
    font-size: 13px;
    background: transparent;
    color: var(--mao-text);
}
.mao-rep-input:focus { outline: 1.5px solid var(--mao-primary); border-radius: 4px; }

.mao-rep-remove {
    background: #fee2e2;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    color: #dc2626;
    font-size: 15px;
    font-weight: bold;
    line-height: 1;
    transition: background .15s;
}
.mao-rep-remove:hover { background: #fca5a5; }

.mao-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1.5px solid var(--mao-primary);
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    color: var(--mao-primary);
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    transition: background .15s, color .15s;
    font-family: inherit;
    line-height: 1.4;
}
.mao-btn-secondary:hover {
    background: var(--mao-primary-pale);
}
.mao-btn-secondary:focus,
.mao-btn-secondary:active {
    outline: none;
    background: var(--mao-primary-pale);
    color: var(--mao-primary);
    border-color: var(--mao-primary);
    box-shadow: none;
}
/* When combined with .mao-btn override the large size */
.mao-btn.mao-btn-secondary {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 8px;
    border: 1.5px solid var(--mao-primary);
    background: transparent;
    color: var(--mao-primary);
    box-shadow: none;
}
.mao-btn.mao-btn-secondary:hover {
    background: var(--mao-primary-pale);
    transform: none;
    box-shadow: none;
}

.mao-rep-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--mao-light);
    border: 1.5px dashed var(--mao-primary);
    border-radius: 8px;
    padding: 7px 18px;
    cursor: pointer;
    color: var(--mao-primary);
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
    transition: background .15s;
}
.mao-rep-add:hover { background: #ede9fe; }
.mao-rep-add:focus,
.mao-rep-add:active {
    outline: none;
    background: #ede9fe;
    color: var(--mao-primary);
    border-color: var(--mao-primary);
    box-shadow: none;
}

/* ── Notice blocks (display-only informational fields) ───────────────────── */
.mao-notice {
    border-radius: 12px;
    padding: 18px 20px;
    margin: 4px 0;
    border: 1.5px solid;
}
.mao-notice-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.mao-notice-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.4;
}
.mao-notice-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}
.mao-notice-body {
    font-size: 13px;
    line-height: 1.6;
    margin: 6px 0 0;
    color: inherit;
    opacity: .85;
}
.mao-notice-steps {
    margin: 10px 0 4px;
    padding-left: 22px;
    font-size: 13px;
    line-height: 1.7;
}
.mao-notice-steps li {
    margin-bottom: 4px;
}
.mao-notice-steps li:last-child { margin-bottom: 0; }

/* Instruction – purple/violet */
.mao-notice-instruction {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #4c1d95;
}
.mao-notice-instruction .mao-notice-title { color: #4c1d95; }

/* Warning – amber/yellow */
.mao-notice-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #78350f;
}
.mao-notice-warning .mao-notice-title { color: #78350f; }

/* Info – blue */
.mao-notice-info {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e3a5f;
}
.mao-notice-info .mao-notice-title { color: #1e3a5f; }

/* Success – green */
.mao-notice-success {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #064e3b;
}
.mao-notice-success .mao-notice-title { color: #064e3b; }

/* Conditional field (hidden by default until condition met) */
.mao-cond-field { display: none; }

/* ── File upload ──────────────────────────────────────────────────────────── */
.mao-file-upload-wrap { margin-top: 8px; }
.mao-file-input { display: none; }
.mao-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px dashed var(--mao-primary);
    border-radius: 12px;
    padding: 28px 20px;
    cursor: pointer;
    background: var(--mao-light);
    transition: background .2s, border-color .2s;
    text-align: center;
}
.mao-file-label:hover, .mao-file-label.drag-over {
    background: #ede9fe;
    border-color: var(--mao-secondary);
}
.mao-file-icon { font-size: 28px; }
.mao-file-text { font-size: 14px; font-weight: 600; color: var(--mao-primary); }
.mao-file-label small { color: #9ca3af; font-size: 12px; }

.mao-file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.mao-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
}
.mao-file-name { font-weight: 500; color: #166534; }
.mao-file-size { color: #6b7280; font-size: 12px; }

/* ── Summary (step 8 review) ─────────────────────────────────────────────── */
.mao-summary-box {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 12px;
    padding: 20px 24px;
}
.mao-summary-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.mao-summary-dl dt {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    padding: 3px 0;
    white-space: nowrap;
}
.mao-summary-dl dd {
    color: #111827;
    font-size: 13px;
    padding: 3px 0;
    margin: 0;
    word-break: break-word;
}

/* Google form wrapper inherits the same colors as Meta Ads */

/* ── WWW + Wizytówka form styles ── */
/* address grid */
.mao-address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.mao-address-grid input, .mao-address-grid select { width: 100%; margin: 0; }
/* hours grid */
.mao-hours-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mao-hours-row  { display: flex; align-items: center; gap: 12px; }
.mao-hours-day  { min-width: 110px; font-weight: 500; color: #374151; }
.mao-hours-row input { flex: 1; }
/* social grid */
.mao-social-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mao-social-row  { display: flex; align-items: center; gap: 12px; }
.mao-social-icon { min-width: 130px; font-weight: 500; color: #374151; font-size: 14px; }
.mao-social-row input { flex: 1; }
/* keywords / advantages / domains repeaters */
.mao-keywords-wrap, .mao-advantages-wrap, .mao-domains-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.mao-keyword-row, .mao-advantage-row, .mao-domain-row { display: flex; align-items: center; gap: 8px; }
.mao-keyword-row input, .mao-advantage-row input, .mao-domain-row input { flex: 1; }
/* icon remove button */
.mao-btn-icon { background: none; border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer; padding: 4px 8px; color: #6b7280; font-size: 14px; line-height: 1; }
.mao-btn-icon:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
/* consent */
.mao-consent-wrap  { margin-top: 24px; padding: 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; }
.mao-consent-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.mao-consent-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
/* conditional field highlight */
.mao-cond-field { margin-top: 16px; padding: 16px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; }
/* responsive */
@media (max-width: 640px) {
    .mao-address-grid { grid-template-columns: 1fr; }
    .mao-social-icon  { min-width: 90px; }
    .mao-hours-day    { min-width: 80px; }
}

/* ── Visual aliases – WWW / Wizytówka / Strona WWW step divs ────────────────
   Gives .mao-www-step, .mao-wiz-step, .mao-wwws-step the same look as
   .mao-section (white card with padding + fade-in animation).
   JS still uses these classes for show/hide so we keep them separate.
   ─────────────────────────────────────────────────────────────────────────── */
.mao-www-step,
.mao-wiz-step,
.mao-wwws-step {
    padding: 32px 32px 24px;
    background: var(--mao-white);
    animation: maoFadeIn 0.3s ease;
}

/* ── Field-group aliases (used by Strona WWW form) ───────────────────────── */
.mao-field-group {
    margin-bottom: 22px;
}

.mao-field-group .mao-label,
.mao-field-group label.mao-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--mao-text);
    margin-bottom: 8px;
}

.mao-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--mao-border);
    border-radius: var(--mao-radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--mao-text);
    background: var(--mao-white);
    transition: var(--mao-transition);
    box-sizing: border-box;
}

.mao-input:focus {
    outline: none;
    border-color: var(--mao-primary);
    box-shadow: 0 0 0 3px var(--mao-primary-pale);
}

.mao-input.mao-input-error {
    border-color: var(--mao-error);
    box-shadow: 0 0 0 3px #fee2e2;
}

.mao-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--mao-primary) 0%, var(--mao-accent) 100%);
    color: var(--mao-white);
    border: none;
    border-radius: var(--mao-radius);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--mao-transition);
}

.mao-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--mao-shadow);
}

/* ── Login-gate tab aliases (used by Strona WWW JS) ─────────────────────── */
.mao-login-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mao-text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: var(--mao-transition);
    text-align: center;
    line-height: 1.3;
}

.mao-login-tab:hover {
    color: var(--mao-primary);
    background: var(--mao-primary-pale);
    border-radius: 6px 6px 0 0;
}

.mao-login-tab.mao-login-tab-active,
.mao-login-tab.active {
    color: var(--mao-primary);
    border-bottom-color: var(--mao-primary);
    background: none;
}

.mao-login-panel {
    display: none;
}

.mao-login-panel.mao-login-panel-active {
    display: block;
    animation: maoFadeIn 0.2s ease;
}

/* ── Message aliases for Strona WWW login messages ──────────────────────── */
.mao-login-msg {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--mao-radius);
    font-size: 14px;
    font-weight: 500;
}

.mao-msg-error  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.mao-msg-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ── Required asterisk alias ────────────────────────────────────────────── */
.mao-required { color: var(--mao-error); }

/* ── Two-column row for Strona WWW ─────────────────────────────────────── */
.mao-two-col-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 580px) {
    .mao-two-col-row { grid-template-columns: 1fr; }
    .mao-www-step,
    .mao-wiz-step,
    .mao-wwws-step { padding: 24px 20px 20px; }
}

/* ── Fix select elements using mao-input class (phone prefix, country) ─── */
select.mao-input {
    appearance: auto;
    -webkit-appearance: auto;
    height: auto;
    min-height: 44px;
    line-height: 1.5;
    cursor: pointer;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Wider phone prefix to accommodate flag emoji + country code */
.mao-phone-row .mao-phone-prefix {
    width: 115px;
}
