/* =============================================
   Siteway Studio — Questionnaire & Status Styles
   ============================================= */

:root {
    --sw-primary: #0d9488;
    --sw-primary-dark: #0a7a70;
    --sw-primary-light: #5eead4;
    --sw-primary-bg: #f0fdfa;
    --sw-dark: #0f172a;
    --sw-gray: #64748b;
    --sw-gray-light: #e2e8f0;
    --sw-white: #ffffff;
    --sw-gold: #f59e0b;
    --sw-success: #10b981;
    --sw-danger: #ef4444;
    --sw-radius: 12px;
    --sw-radius-lg: 20px;
    --sw-shadow: 0 4px 24px rgba(0,0,0,.08);
    --sw-shadow-lg: 0 8px 40px rgba(0,0,0,.12);
    --sw-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sw-transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ============================================
   QUESTIONNAIRE
   ============================================ */
.sw-questionnaire {
    font-family: var(--sw-font);
    max-width: 720px;
    margin: 40px auto;
    padding: 0 24px;
    color: var(--sw-dark);
    -webkit-font-smoothing: antialiased;
}

.sw-questionnaire *, .sw-questionnaire *::before, .sw-questionnaire *::after {
    box-sizing: border-box;
}

.sw-q-header {
    text-align: center;
    margin-bottom: 40px;
}

.sw-q-header .sw-logo-mark { justify-content: center; margin-bottom: 24px; }

.sw-q-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
}

.sw-q-header p {
    color: var(--sw-gray);
    font-size: 16px;
}

/* Step indicators */
.sw-q-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
}

.sw-q-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.sw-q-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sw-gray-light);
    color: var(--sw-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all var(--sw-transition);
}

.sw-q-step.active .sw-q-step-num,
.sw-q-step.completed .sw-q-step-num {
    background: var(--sw-primary);
    color: var(--sw-white);
}

.sw-q-step.completed .sw-q-step-num {
    background: var(--sw-success);
}

.sw-q-step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sw-gray);
    text-align: center;
}

.sw-q-step.active .sw-q-step-label {
    color: var(--sw-primary);
}

.sw-q-step-line {
    flex: 1;
    height: 3px;
    background: var(--sw-gray-light);
    margin: 0 8px;
    margin-top: -20px;
    max-width: 80px;
    transition: background var(--sw-transition);
}

.sw-q-step-line.completed {
    background: var(--sw-success);
}

/* Panels */
.sw-q-panel {
    display: none;
    background: var(--sw-white);
    border-radius: var(--sw-radius-lg);
    box-shadow: var(--sw-shadow);
    padding: 40px;
    animation: sw-fade-in .4s ease;
}

.sw-q-panel.active {
    display: block;
}

@keyframes sw-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.sw-q-panel h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px;
}

.sw-q-desc {
    color: var(--sw-gray);
    font-size: 15px;
    margin-bottom: 28px;
}

.sw-q-subheading {
    font-size: 18px;
    font-weight: 700;
    margin: 28px 0 4px;
    padding-top: 20px;
    border-top: 1px solid var(--sw-gray-light);
}

.sw-q-note {
    font-size: 13px;
    color: var(--sw-gray);
    margin-top: 16px;
    font-style: italic;
}

/* Form fields */
.sw-form-group {
    margin-bottom: 20px;
}

.sw-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--sw-dark);
}

.sw-form-group label .required { color: var(--sw-danger); }

.sw-form-group input[type="text"],
.sw-form-group input[type="email"],
.sw-form-group input[type="tel"],
.sw-form-group input[type="url"],
.sw-form-group textarea,
.sw-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--sw-gray-light);
    border-radius: var(--sw-radius);
    font-family: var(--sw-font);
    font-size: 15px;
    transition: border-color var(--sw-transition);
    background: var(--sw-white);
    color: var(--sw-dark);
}

.sw-form-group input:focus,
.sw-form-group textarea:focus,
.sw-form-group select:focus {
    outline: none;
    border-color: var(--sw-primary);
    box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

.sw-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Radio */
.sw-radio-group {
    display: flex;
    gap: 20px;
    padding-top: 6px;
}

.sw-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400 !important;
    cursor: pointer;
}

.sw-radio input[type="radio"] {
    accent-color: var(--sw-primary);
    width: 18px;
    height: 18px;
}

/* File upload */
.sw-upload-area {
    border: 2px dashed var(--sw-gray-light);
    border-radius: var(--sw-radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--sw-transition);
}

.sw-upload-area:hover {
    border-color: var(--sw-primary);
    background: var(--sw-primary-bg);
}

.sw-upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.sw-upload-area p {
    font-size: 14px;
    margin: 0 0 4px;
    color: var(--sw-dark);
}

.sw-upload-area small {
    color: var(--sw-gray);
}

.sw-upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--sw-primary-bg);
    border-radius: var(--sw-radius);
    margin-top: 12px;
}

.sw-upload-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.sw-upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.sw-upload-preview-grid .sw-upload-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.sw-upload-preview-grid .sw-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sw-upload-thumb .sw-remove-upload {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Domain checker */
.sw-domain-checker {
    margin: 24px 0;
}

.sw-domain-input-group {
    display: flex;
    gap: 12px;
}

.sw-domain-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--sw-gray-light);
    border-radius: var(--sw-radius);
    font-family: var(--sw-font);
    font-size: 16px;
}

.sw-domain-input-group input:focus {
    outline: none;
    border-color: var(--sw-primary);
}

.sw-domain-result {
    margin-top: 16px;
    padding: 16px 20px;
    border-radius: var(--sw-radius);
    font-size: 15px;
    font-weight: 600;
}

.sw-domain-result.available {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.sw-domain-result.unavailable {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.sw-domain-result.premium {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.sw-domain-alternatives {
    margin-top: 20px;
}

.sw-domain-alternatives h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--sw-gray);
}

.sw-domain-alt-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sw-domain-alt-btn {
    padding: 8px 16px;
    border: 1px solid var(--sw-gray-light);
    border-radius: 50px;
    font-size: 13px;
    font-family: var(--sw-font);
    background: var(--sw-white);
    cursor: pointer;
    transition: all var(--sw-transition);
}

.sw-domain-alt-btn:hover {
    border-color: var(--sw-primary);
    background: var(--sw-primary-bg);
    color: var(--sw-primary);
}

/* Nav */
.sw-q-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--sw-gray-light);
}

/* Buttons */
.sw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--sw-font);
    font-weight: 700;
    font-size: 15px;
    padding: 14px 32px;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--sw-transition);
}

.sw-btn-primary {
    background: var(--sw-primary);
    color: var(--sw-white);
    border-color: var(--sw-primary);
}

.sw-btn-primary:hover {
    background: var(--sw-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(13,148,136,.3);
}

.sw-btn-outline {
    background: transparent;
    color: var(--sw-primary);
    border-color: var(--sw-primary);
}

.sw-btn-outline:hover {
    background: var(--sw-primary);
    color: var(--sw-white);
}

.sw-btn-lg {
    font-size: 17px;
    padding: 16px 36px;
}

.sw-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sw-spin .6s linear infinite;
}

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

/* Notices */
.sw-notice {
    font-family: var(--sw-font);
    max-width: 600px;
    margin: 60px auto;
    padding: 32px;
    background: var(--sw-primary-bg);
    border-radius: var(--sw-radius);
    text-align: center;
    font-size: 16px;
    color: var(--sw-dark);
}

.sw-notice a {
    color: var(--sw-primary);
    font-weight: 600;
}

/* ============================================
   PROJECT STATUS PAGE
   ============================================ */
.sw-status-page {
    font-family: var(--sw-font);
    max-width: 700px;
    margin: 40px auto;
    padding: 0 24px;
    color: var(--sw-dark);
    -webkit-font-smoothing: antialiased;
}

.sw-status-hero {
    text-align: center;
    margin-bottom: 40px;
}

.sw-status-icon-large {
    font-size: 56px;
    margin-bottom: 16px;
}

.sw-status-hero h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
}

.sw-domain-label {
    font-size: 16px;
    color: var(--sw-gray);
    font-family: monospace;
    margin-bottom: 16px;
}

.sw-status-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: var(--sw-white);
}

.sw-status-pending { background: var(--sw-gold); }
.sw-status-in_progress { background: #3b82f6; }
.sw-status-review { background: #8b5cf6; }
.sw-status-completed { background: var(--sw-success); }
.sw-status-cancelled { background: var(--sw-danger); }

/* Progress */
.sw-progress-section {
    background: var(--sw-white);
    border-radius: var(--sw-radius-lg);
    box-shadow: var(--sw-shadow);
    padding: 32px;
    margin-bottom: 32px;
}

.sw-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
}

.sw-progress-pct {
    font-size: 20px;
    font-weight: 800;
    color: var(--sw-primary);
}

.sw-progress-bar {
    width: 100%;
    height: 14px;
    background: var(--sw-gray-light);
    border-radius: 7px;
    overflow: hidden;
}

.sw-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sw-primary), var(--sw-primary-light));
    border-radius: 7px;
    transition: width 1s ease;
}

.sw-progress-note {
    font-size: 14px;
    color: var(--sw-gray);
    margin-top: 16px;
    line-height: 1.6;
}

/* Timeline */
.sw-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding: 0 8px;
    position: relative;
}

.sw-timeline::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--sw-gray-light);
    z-index: 0;
}

.sw-timeline-step {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.sw-step-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sw-gray-light);
    color: var(--sw-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all var(--sw-transition);
}

.sw-step-done .sw-step-marker {
    background: var(--sw-success);
    color: var(--sw-white);
}

.sw-step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sw-gray);
}

.sw-step-done .sw-step-label {
    color: var(--sw-dark);
}

/* Cards */
.sw-status-card {
    background: var(--sw-white);
    border-radius: var(--sw-radius-lg);
    box-shadow: var(--sw-shadow);
    padding: 32px;
    margin-bottom: 20px;
}

.sw-status-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.sw-status-card ul {
    padding-left: 20px;
    margin: 0;
}

.sw-status-card li {
    padding: 6px 0;
    font-size: 15px;
    color: var(--sw-gray);
    line-height: 1.5;
}

.sw-contact-card {
    text-align: center;
}

.sw-contact-card p {
    color: var(--sw-gray);
    margin-bottom: 20px;
}

/* Logo mark (shared) */
.sw-logo-mark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sw-brand-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--sw-dark);
}

.sw-brand-name span {
    font-weight: 400;
    color: var(--sw-gray);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
    .sw-q-panel { padding: 24px; }
    .sw-form-row { grid-template-columns: 1fr; }
    .sw-domain-input-group { flex-direction: column; }
    .sw-q-steps { flex-wrap: wrap; gap: 4px; }
    .sw-q-step-line { display: none; }

    .sw-timeline { flex-wrap: wrap; gap: 12px; }
    .sw-timeline::before { display: none; }
    .sw-timeline-step { flex: 0 0 calc(50% - 6px); }
}

/* ============================================
   COLOR PALETTE PICKER
   ============================================ */
.sw-q-desc-sm {
    font-size: 13px;
    color: var(--sw-muted);
    margin: -4px 0 10px;
}

.sw-color-palette {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.sw-color-slot {
    flex: 1 1 200px;
    min-width: 180px;
    background: var(--sw-bg);
    border: 1px solid var(--sw-border);
    border-radius: 12px;
    padding: 16px;
}

.sw-color-slot-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--sw-dark);
    margin-bottom: 8px;
}

.sw-color-preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sw-color-preview {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,.08);
    flex-shrink: 0;
    transition: background .2s;
}
.sw-color-preview-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.sw-color-hex {
    width: 80px;
    font-family: monospace;
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid var(--sw-border);
    border-radius: 6px;
    text-transform: uppercase;
}
.sw-color-hex-sm {
    width: 70px;
    font-size: 12px;
    padding: 4px 6px;
}

.sw-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.sw-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s, border-color .15s;
    padding: 0;
    position: relative;
}
.sw-swatch:hover {
    transform: scale(1.15);
}
.sw-swatch.active {
    border-color: var(--sw-dark);
    box-shadow: 0 0 0 2px rgba(0,0,0,.15);
}
.sw-swatch-sm {
    width: 24px;
    height: 24px;
}

.sw-swatch-custom {
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.sw-swatch-custom input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
}
.sw-swatch-custom span {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
    pointer-events: none;
}

.sw-gradient-toggle {
    margin-top: 4px;
}
.sw-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--sw-muted);
    cursor: pointer;
}
.sw-toggle-label input[type="checkbox"] {
    accent-color: var(--sw-primary);
}

.sw-gradient-extra {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    background: rgba(0,0,0,.02);
    border-radius: 8px;
}

.sw-gradient-arrow {
    font-size: 18px;
    color: var(--sw-muted);
}

/* Palette live preview strip */
.sw-palette-preview {
    display: flex;
    gap: 4px;
    border-radius: 10px;
    overflow: hidden;
    height: 32px;
    margin-bottom: 8px;
}
.sw-palette-strip {
    flex: 1;
    transition: background .3s;
}

/* ============================================
   CHECKBOX GRID — Features & Pages
   ============================================ */
.sw-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.sw-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--sw-border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-size: 14px;
}
.sw-checkbox-item:hover {
    border-color: var(--sw-primary);
    background: var(--sw-primary-bg);
}
.sw-checkbox-item input[type="checkbox"] {
    accent-color: var(--sw-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.sw-checkbox-item input[type="checkbox"]:checked + .sw-checkbox-label {
    color: var(--sw-primary-dark);
    font-weight: 500;
}
.sw-checkbox-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mandatory checkbox items */
.sw-checkbox-item.sw-mandatory {
    background: var(--sw-primary-bg);
    border-color: var(--sw-primary);
    opacity: .85;
    cursor: default;
}
.sw-mandatory-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--sw-primary-dark);
    background: rgba(13, 148, 136, .12);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    letter-spacing: .3px;
}

/* ============================================
   CUSTOM PAGES
   ============================================ */
.sw-custom-pages {
    margin-top: 8px;
}
.sw-custom-page-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.sw-custom-page-name {
    flex: 1;
    max-width: 200px;
}
.sw-custom-page-desc {
    flex: 2;
}
.sw-custom-page-row input {
    padding: 8px 12px;
    border: 1px solid var(--sw-border);
    border-radius: 8px;
    font-size: 14px;
}
.sw-custom-page-row input:focus {
    border-color: var(--sw-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .1);
}
.sw-remove-custom-page {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-size: 18px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.sw-remove-custom-page:hover {
    background: #fef2f2;
}
.sw-custom-pages-note {
    display: block;
    color: var(--sw-muted);
    font-size: 12px;
    margin-top: 4px;
}

.sw-btn-sm {
    font-size: 13px;
    padding: 6px 14px;
}

/* ============================================
   UPLOAD IMPROVEMENTS
   ============================================ */
.sw-upload-area {
    cursor: pointer;
    user-select: none;
}
.sw-upload-area.dragover {
    border-color: var(--sw-primary);
    background: var(--sw-primary-bg);
}

.sw-upload-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.sw-image-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--sw-border);
}
.sw-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sw-remove-image {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw-logo-uploaded {
    position: relative;
    display: inline-block;
}
.sw-logo-uploaded img {
    max-width: 200px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid var(--sw-border);
}
.sw-remove-logo {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   RESPONSIVE — NEW COMPONENTS
   ============================================ */
@media (max-width: 640px) {
    .sw-color-palette { flex-direction: column; gap: 16px; }
    .sw-checkbox-grid { grid-template-columns: 1fr 1fr; }
    .sw-custom-page-row { flex-wrap: wrap; }
    .sw-custom-page-name { max-width: none; flex: 1 1 100%; }
    .sw-custom-page-desc { flex: 1 1 100%; }
    .sw-gradient-extra { flex-wrap: wrap; }
}
