/* ==========================================
   SIMPLE DEMO PAGE STYLING
   Clean, user-friendly layout for non-technical users
   ========================================== */

/* Demo Section */
.demo-section {
    min-height: 100vh;
    padding: 120px 0 60px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient overlay for consistency */
.demo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(169, 17, 1, 0.02) 50%, transparent 100%);
    pointer-events: none;
}

[data-theme="dark"] .demo-section::before {
    background: linear-gradient(135deg, transparent 0%, rgba(169, 17, 1, 0.04) 50%, transparent 100%);
}

/* Layout - Form and Info side by side */
.demo-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

/* Form Container */
.demo-form-container {
    max-width: 100%;
}

/* Form Card - Glassmorphism style */
.demo-form-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 250, 248, 0.75) 50%, rgba(169, 17, 1, 0.06) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(169, 17, 1, 0.06);
    position: relative;
}

/* Form Elements */
.demo-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

/* User Stories Section */
.user-stories-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.stories-header {
    margin-bottom: 1.25rem;
}

.stories-header label {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.stories-hint {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* User Story Card */
.user-story {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.user-story:hover {
    border-color: rgba(169, 17, 1, 0.2);
}

.user-story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(169, 17, 1, 0.06) 0%, rgba(169, 17, 1, 0.02) 100%);
    border-bottom: 1px solid rgba(169, 17, 1, 0.08);
}

.user-story-number {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.story-fields {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.story-fields .form-group {
    gap: 0.375rem;
}

.story-fields .form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
}

.story-fields .form-group input {
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
}

/* Add Story Button */
.btn-add-story {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: transparent;
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-story:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.05);
}

.btn-add-story svg {
    transition: transform 0.2s ease;
}

.btn-add-story:hover svg {
    transform: scale(1.1);
}

/* Remove Story Button */
.btn-remove-story {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-remove-story:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Submit Button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Form Success/Error States */
.form-success,
.form-error {
    display: none;
}

.form-success.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.form-success .success-icon {
    color: #22c55e;
    margin-bottom: 1rem;
}

.form-success h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-success p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.form-error.show {
    display: block;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.form-error p {
    color: #ef4444;
    font-size: 0.9375rem;
    margin: 0;
}

/* Hide form on success */
.demo-form-card:has(.form-success.show) .demo-form {
    display: none;
}

/* Info Sidebar */
.demo-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 100px;
}

.demo-info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 250, 248, 0.75) 50%, rgba(169, 17, 1, 0.06) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.demo-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(169, 17, 1, 0.08);
}

.info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 0.75rem;
    color: white;
    margin-bottom: 1rem;
}

.demo-info-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.demo-info-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

/* Contact Alternative */
.demo-contact-alt {
    background: linear-gradient(135deg, rgba(169, 17, 1, 0.08) 0%, rgba(169, 17, 1, 0.02) 100%);
    border: 1px solid rgba(169, 17, 1, 0.12);
    border-radius: 1rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.demo-contact-alt:hover {
    border-color: rgba(169, 17, 1, 0.2);
    box-shadow: 0 4px 16px rgba(169, 17, 1, 0.08);
}

.demo-contact-alt p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.875rem;
}

.demo-contact-alt .btn {
    width: 100%;
    justify-content: center;
}

/* Demo page contact method - step descriptions instead of links */
.demo-page .contact-method p {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    margin: 0;
}

/* Honeypot */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .demo-layout {
        grid-template-columns: 1fr 320px;
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .demo-layout {
        grid-template-columns: 1fr;
    }

    .demo-info {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .demo-info-card {
        flex: 1;
        min-width: 280px;
    }

    .demo-contact-alt {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .demo-section {
        padding: 100px 0 40px;
    }

    .demo-form-card {
        padding: 1.25rem;
    }

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

    .demo-info {
        flex-direction: column;
    }

    .demo-info-card {
        min-width: 100%;
    }
}

/* ==========================================
   DARK MODE
   ========================================== */
[data-theme="dark"] .demo-form-card {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(35, 25, 25, 0.65) 50%, rgba(169, 17, 1, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 12px rgba(169, 17, 1, 0.1);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: rgba(20, 20, 20, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .user-story {
    background: rgba(20, 20, 20, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .user-story:hover {
    border-color: rgba(169, 17, 1, 0.3);
}

[data-theme="dark"] .user-story-header {
    background: linear-gradient(135deg, rgba(169, 17, 1, 0.12) 0%, rgba(169, 17, 1, 0.04) 100%);
    border-color: rgba(169, 17, 1, 0.15);
}

[data-theme="dark"] .btn-add-story {
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .demo-info-card {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.6) 0%, rgba(35, 25, 25, 0.65) 50%, rgba(169, 17, 1, 0.1) 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .demo-info-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(169, 17, 1, 0.15);
}

[data-theme="dark"] .demo-contact-alt {
    background: linear-gradient(135deg, rgba(169, 17, 1, 0.15) 0%, rgba(169, 17, 1, 0.05) 100%);
    border-color: rgba(169, 17, 1, 0.2);
}

[data-theme="dark"] .demo-contact-alt:hover {
    border-color: rgba(169, 17, 1, 0.35);
    box-shadow: 0 4px 20px rgba(169, 17, 1, 0.15);
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-success.show {
    animation: successFadeIn 0.4s ease-out;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .form-success.show {
        animation: none;
    }

    .btn-add-story svg,
    .form-group input,
    .form-group textarea {
        transition: none;
    }
}
