/* ============================================
   Add Content Page — Form + Phone Preview
   ============================================ */
.add-content-page {
    padding: calc(72px + var(--space-4)) 0 0;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.add-content-body {
    padding: var(--space-10) 0 var(--space-20);
}

/* Two-column layout: form left, phone right */
.form-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-10);
    align-items: start;
}

/* ---- Left: Form Column ---- */
.form-column {}

/* Type header banner */
.type-banner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6);
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-100);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-xs);
}
.type-banner-icon {
    width: 48px; height: 48px; min-width: 48px;
    border-radius: var(--radius-lg);
    background: var(--blue-50); color: var(--blue-600);
    display: flex; align-items: center; justify-content: center;
}
.type-banner-icon svg { width: 22px; height: 22px; }
.type-banner-text h2 {
    font-family: var(--font-display); font-size: var(--text-lg);
    font-weight: 700; color: var(--slate-900); margin-bottom: 2px;
}
.type-banner-text p {
    font-size: var(--text-sm); color: var(--slate-500);
}
.type-banner-change {
    margin-left: auto;
    font-family: var(--font-display); font-size: var(--text-sm);
    font-weight: 500; color: var(--blue-600); text-decoration: none;
    padding: 6px 14px; border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
}
.type-banner-change:hover { background: var(--blue-50); }

/* Form sections */
.form-section {
    background: white;
    border-radius: var(--radius-xl);
    border: 1px solid var(--slate-100);
    margin-bottom: var(--space-6);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.form-section-header {
    display: flex; align-items: center; gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--slate-100);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
    user-select: none;
}
.form-section-header:hover { background: var(--slate-50); }
.form-section-icon {
    width: 32px; height: 32px; border-radius: var(--radius-md);
    background: var(--blue-50); color: var(--blue-600);
    display: flex; align-items: center; justify-content: center;
}
.form-section-icon svg { width: 16px; height: 16px; }
.form-section-title {
    font-family: var(--font-display); font-weight: 600;
    font-size: var(--text-base); color: var(--slate-900); flex: 1;
}
.form-section-subtitle {
    font-size: var(--text-sm); color: var(--slate-400); font-weight: 400;
    margin-left: var(--space-2);
}
.form-section-chevron {
    width: 20px; height: 20px; stroke: var(--slate-400);
    transition: transform var(--duration-base) var(--ease-out);
}
.form-section.open .form-section-chevron { transform: rotate(180deg); }
.form-section-body {
    padding: var(--space-6);
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
}
.form-section:not(.open) .form-section-body {
    max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; opacity: 0;
}
.form-section-chevron {
    transition: transform 0.3s ease;
}
.form-section:not(.open) .form-section-chevron {
    transform: rotate(-90deg);
}

/* Form fields */
.form-group {
    margin-bottom: var(--space-5);
}
.form-group:last-child { margin-bottom: 0; }

.form-label {
    display: block; font-family: var(--font-display); font-weight: 600;
    font-size: var(--text-sm); color: var(--slate-700);
    margin-bottom: var(--space-2);
}
.form-label .required {
    color: var(--danger); margin-left: 2px;
}
.form-hint {
    font-size: var(--text-sm); color: var(--slate-400);
    margin-top: var(--space-1); line-height: 1.4;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    font-family: var(--font-body); font-size: var(--text-base);
    padding: 12px 16px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-lg);
    background: white; color: var(--slate-900);
    outline: none;
    transition: all var(--duration-base) var(--ease-out);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--slate-400); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 4px var(--blue-50);
}
.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.form-input-with-icon {
    position: relative;
}
.form-input-with-icon .form-input {
    padding-left: 44px;
}
.form-input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; stroke: var(--slate-400); pointer-events: none;
}

/* Input with action button (e.g. password eye toggle) */
.form-input-with-action {
    position: relative;
}
.form-input-with-action .form-input {
    padding-right: 48px;
}
.input-action-btn {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border: none; background: transparent;
    border-radius: var(--radius-md); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--slate-400);
    transition: all var(--duration-fast) var(--ease-out);
}
.input-action-btn:hover { background: var(--slate-100); color: var(--slate-600); }
.input-action-btn svg { width: 18px; height: 18px; }

.form-textarea { resize: vertical; min-height: 100px; }

.form-error {
    font-size: var(--text-sm); color: var(--danger);
    margin-top: var(--space-1); display: flex; align-items: center; gap: var(--space-1);
}

/* Toggle / Checkbox */
.form-toggle {
    display: flex; align-items: center; gap: var(--space-3);
    cursor: pointer; user-select: none; min-height: 44px;
}
.form-toggle input { display: none; }
.toggle-track {
    width: 44px; height: 24px; min-width: 44px;
    background: var(--slate-200); border-radius: 12px;
    position: relative; transition: background var(--duration-base) var(--ease-out);
}
.toggle-track::after {
    content: ''; position: absolute;
    width: 18px; height: 18px; border-radius: 50%;
    background: white; top: 3px; left: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform var(--duration-base) var(--ease-spring);
}
.form-toggle input:checked + .toggle-track {
    background: var(--blue-600);
}
.form-toggle input:checked + .toggle-track::after {
    transform: translateX(20px);
}
.toggle-label {
    font-family: var(--font-display); font-weight: 500;
    font-size: var(--text-sm); color: var(--slate-700); display: block;
}
.toggle-desc {
    font-size: var(--text-xs); color: var(--slate-400); margin-top: 1px; display: block;
}

/* Conditional field (hidden until toggled) */
.conditional-field {
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height var(--duration-slow) var(--ease-out),
                opacity var(--duration-base) var(--ease-out),
                margin var(--duration-base) var(--ease-out);
    margin-top: 0;
}
.conditional-field.visible {
    max-height: 120px; opacity: 1; margin-top: var(--space-4);
}

/* Form actions */
.form-actions {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: var(--space-6); margin-top: var(--space-2);
}

/* ---- Right: Phone Mockup Column ---- */
.preview-column {
    position: sticky;
    top: calc(72px + 68px + var(--space-8)); /* navbar + stepper + gap */
}

/* Preview toggle tabs */
.preview-tabs {
    display: flex; justify-content: center; gap: var(--space-2);
    margin-bottom: var(--space-5);
}
.preview-tab {
    font-family: var(--font-display); font-size: var(--text-sm);
    font-weight: 500; padding: 8px 18px; border-radius: var(--radius-full);
    border: none; cursor: pointer; background: transparent; color: var(--slate-500);
    transition: all var(--duration-fast) var(--ease-out);
}
.preview-tab.active {
    background: var(--blue-600); color: white; box-shadow: var(--shadow-blue);
}
.preview-tab:not(.active):hover { background: var(--slate-100); color: var(--slate-700); }

/* Phone frame */
.phone-frame {
    width: 300px; margin: 0 auto;
    background: #0f172a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08),
                inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
}
.phone-frame::before {
    content: ''; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 100px; height: 28px; background: #0f172a; border-radius: 0 0 16px 16px;
    z-index: 10;
}
.phone-notch {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    width: 100px; height: 28px; background: #0f172a; border-radius: 0 0 16px 16px;
    z-index: 10;
}
.phone-screen {
    background: white;
    border-radius: 30px;
    overflow: hidden;
    min-height: 520px;
    position: relative;
}
.phone-status-bar {
    height: 44px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; font-size: 12px; font-weight: 600;
    color: var(--slate-900); background: white;
    position: relative; z-index: 11;
}
.phone-status-time { font-weight: 700; }
.phone-status-icons { display: flex; gap: 4px; align-items: center; }

/* Phone screen content */
.phone-content {
    padding: 0;
    min-height: 476px;
    display: flex;
    flex-direction: column;
}

/* Website URL preview content */
.preview-website {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; padding: var(--space-8) var(--space-6);
    text-align: center;
}
.preview-url-bar {
    width: 100%; padding: 10px 14px;
    background: var(--blue-600); color: white;
    border-radius: var(--radius-lg);
    font-size: 12px; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: var(--space-6);
    word-break: break-all;
    text-align: left;
    min-height: 40px;
    transition: all var(--duration-base) var(--ease-out);
}
.preview-url-bar svg { min-width: 14px; width: 14px; height: 14px; stroke: rgba(255,255,255,0.7); }
.preview-url-text {
    overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; flex: 1;
    opacity: 0.9;
}
.preview-url-bar.empty { background: var(--slate-200); color: var(--slate-400); }
.preview-url-bar.empty svg { stroke: var(--slate-400); }

.preview-site-placeholder {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: var(--space-4);
}
.preview-site-skeleton {
    width: 100%;
}
.skeleton-line {
    height: 10px; background: var(--slate-100); border-radius: 5px;
    margin-bottom: 8px;
}
.skeleton-line.w-full { width: 100%; }
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.thick { height: 16px; margin-bottom: 12px; }
.skeleton-block {
    width: 100%; height: 100px; background: var(--slate-100);
    border-radius: var(--radius-md); margin-bottom: 12px;
}

.preview-redirect-msg {
    font-size: 11px; color: var(--slate-400); font-weight: 500;
    margin-top: var(--space-4);
    display: flex; align-items: center; gap: 6px;
}
.preview-redirect-msg svg { width: 14px; height: 14px; stroke: var(--slate-400); }

/* QR code preview tab */
.preview-qr {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; padding: var(--space-8) var(--space-6); text-align: center;
}
.preview-qr-placeholder {
    width: 180px; height: 180px;
    background: var(--slate-50); border: 2px dashed var(--slate-200);
    border-radius: var(--radius-xl);
    display: flex; align-items: center; justify-content: center;
    color: var(--slate-400);
}
.preview-qr-placeholder svg { width: 48px; height: 48px; stroke: var(--slate-300); }
.preview-qr-text {
    font-size: var(--text-sm); color: var(--slate-400);
    margin-top: var(--space-4); max-width: 200px;
}

/* Phone home indicator */
.phone-home-bar {
    height: 28px; display: flex; align-items: end; justify-content: center;
    padding-bottom: 8px; background: white;
}
.phone-home-bar span {
    width: 120px; height: 4px; background: var(--slate-200); border-radius: 2px;
}

/* Responsive */
@media (max-width: 960px) {
    .form-layout { grid-template-columns: 1fr; }
    .preview-column { position: static; order: -1; }
    .phone-frame { width: 260px; }
    .phone-screen { min-height: 440px; }
    .phone-content { min-height: 396px; }
}

/* Input with prefix (e.g. @ for Instagram) */
.form-input-with-prefix { position: relative; }
.form-prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--slate-400); font-weight: 600; font-size: 15px; z-index: 1; pointer-events: none; }

/* Radio group */
.radio-group { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.radio-option { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: var(--text-sm); color: var(--slate-700); padding: 8px 16px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-lg); transition: all var(--duration-fast); }
.radio-option:has(input:checked) { border-color: var(--blue-400); background: var(--blue-50); color: var(--blue-700); }
.radio-option input { accent-color: var(--blue-600); }

/* Info banner */
.info-banner { transition: all var(--duration-base); }

/* Color presets */
.color-preset { transition: all var(--duration-fast); }
.color-preset:hover { transform: scale(1.1); }

/* Landing page designer sections */
.landing-designer .form-section { margin-bottom: var(--space-4); }

/* Color picker for content pages — mirrors design.css */
.content-color-picker { display: flex; align-items: center; gap: var(--space-3); }
.color-picker-wrap {
    display: flex; align-items: center; gap: var(--space-2);
    border: 1.5px solid var(--slate-200); border-radius: var(--radius-lg);
    padding: 4px 10px; background: white; transition: border-color var(--duration-fast);
}
.color-picker-wrap:focus-within { border-color: var(--blue-400); box-shadow: 0 0 0 3px var(--blue-50); }
.color-swatch-input { width: 32px; height: 32px; border: none; padding: 0; cursor: pointer; border-radius: var(--radius-sm); background: none; }
.color-swatch-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-swatch-input::-webkit-color-swatch { border: 2px solid rgba(0,0,0,0.06); border-radius: var(--radius-sm); }
.color-hex-input { font-family: var(--font-body); font-size: var(--text-sm); color: var(--slate-700); border: none; outline: none; width: 72px; text-transform: uppercase; background: transparent; }

/* Color palette swatches */
.palette-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-3); }
.palette-swatch {
    width: 48px; height: 32px; border-radius: var(--radius-md); border: 2px solid transparent;
    cursor: pointer; transition: all var(--duration-fast); position: relative;
}
.palette-swatch:hover { transform: scale(1.08); }
.palette-swatch.active { border-color: var(--blue-600); box-shadow: 0 0 0 2px var(--blue-100); }

/* Image upload area */
.upload-area {
    border: 2px dashed var(--slate-200); border-radius: var(--radius-xl);
    padding: var(--space-8); text-align: center; cursor: pointer;
    transition: all var(--duration-fast); background: var(--slate-50);
}
.upload-area:hover { border-color: var(--blue-300); background: var(--blue-50); }
.upload-area-icon { width: 48px; height: 48px; margin: 0 auto var(--space-3); border-radius: 50%; background: var(--blue-50); display: flex; align-items: center; justify-content: center; }
.upload-area-icon svg { width: 22px; height: 22px; stroke: var(--blue-400); }
.upload-area-text { font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); color: var(--blue-600); margin-bottom: var(--space-1); }
.upload-area-hint { font-size: var(--text-xs); color: var(--slate-400); }
.upload-preview { max-width: 100%; border-radius: var(--radius-lg); margin-top: var(--space-3); }

/* Social network icons grid */
.social-icons-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.social-icon-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--slate-200);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: all var(--duration-fast); background: white; position: relative;
}
.social-icon-btn:hover { border-color: var(--blue-300); transform: scale(1.1); }
.social-icon-btn.active { border-color: var(--blue-600); background: var(--blue-50); }
.social-icon-btn img, .social-icon-btn svg { width: 18px; height: 18px; }

/* Dynamic link list */
.link-item { background: white; border: 1px solid var(--slate-200); border-radius: var(--radius-xl); padding: var(--space-4); margin-bottom: var(--space-3); }
.link-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.link-item-title { font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); color: var(--slate-700); }
.link-item-actions { display: flex; gap: var(--space-2); }
.link-item-btn { width: 28px; height: 28px; border-radius: var(--radius-md); border: 1px solid var(--slate-200); background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--slate-400); }
.link-item-btn:hover { border-color: var(--blue-300); color: var(--blue-600); }
.link-item-btn.danger:hover { border-color: #fca5a5; color: var(--danger); }
.add-link-btn { width: 100%; padding: 12px; border: 2px dashed var(--blue-200); border-radius: var(--radius-xl); background: var(--blue-50); color: var(--blue-600); font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm); cursor: pointer; transition: all var(--duration-fast); display: flex; align-items: center; justify-content: center; gap: var(--space-2); }
.add-link-btn:hover { background: var(--blue-100); border-color: var(--blue-400); }

/* Opening hours table */
.hours-grid { display: flex; flex-direction: column; gap: var(--space-2); }
.hours-row { display: flex; align-items: center; gap: var(--space-3); padding: 6px 0; }
.hours-day { font-family: var(--font-display); font-weight: 500; font-size: var(--text-sm); color: var(--slate-700); min-width: 90px; }
.hours-toggle { accent-color: var(--blue-600); }
.hours-inputs { display: flex; align-items: center; gap: var(--space-2); }
.hours-input { width: 90px; padding: 6px 10px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-md); font-size: var(--text-xs); text-align: center; }
.hours-sep { color: var(--slate-400); font-size: var(--text-xs); }

/* Facilities grid */
.facilities-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.facility-btn { padding: 8px 14px; border: 1.5px solid var(--slate-200); border-radius: var(--radius-lg); font-size: var(--text-xs); font-family: var(--font-display); font-weight: 500; color: var(--slate-600); cursor: pointer; transition: all var(--duration-fast); display: flex; align-items: center; gap: var(--space-2); }
.facility-btn:hover { border-color: var(--blue-300); }
.facility-btn.active { border-color: var(--blue-400); background: var(--blue-50); color: var(--blue-700); }


/* Global spin animation for loading states */
@keyframes spin { to { transform: rotate(360deg); } }

