/* StitchCraft Sewing Support Form Styling */

/* CSS Variables for Premium Styling */
:root {
    --bg-primary: #0a0813;
    --card-bg: rgba(20, 16, 38, 0.45);
    --card-border: rgba(147, 112, 219, 0.15);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.4);
    --accent-teal: #06b6d4;
    --accent-teal-glow: rgba(6, 182, 212, 0.3);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-error: #ef4444;
    
    --input-bg: rgba(15, 12, 30, 0.6);
    --input-border: rgba(139, 92, 246, 0.2);
    --input-focus-border: #8b5cf6;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Core Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 2rem 1rem;
}

/* Ambient Glowing Background Orbs */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: float-slow 15s infinite alternate ease-in-out;
}

.orb-1 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    top: -10%;
    right: -5%;
}

.orb-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-teal) 0%, transparent 70%);
    bottom: -15%;
    left: -10%;
    animation-delay: -5s;
}

/* Glassmorphism Card Container */
.container {
    width: 100%;
    max-width: 550px;
    z-index: 10;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Glass Highlight Top Edge */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

/* Header Styling */
.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.logo-icon {
    font-size: 1.75rem;
    color: #ffffff;
}

.app-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #e9d5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.app-subtitle {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-teal);
    margin-bottom: 1rem;
}

.lead-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Form Layout & Fields */
.form-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.85rem;
    color: #e5e7eb;
    letter-spacing: 0.02em;
}

/* Input Wrapper & Icons */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

.textarea-icon {
    top: 1.1rem;
}

/* Input Controls */
.form-control {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 0.9rem 1rem 0.9rem 3rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition-normal);
}

.form-control::placeholder {
    color: rgba(156, 163, 175, 0.5);
}

.form-control:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 4px var(--accent-purple-glow);
    background-color: rgba(20, 16, 38, 0.8);
}

.form-control:focus + .field-icon {
    color: var(--accent-purple);
}

/* Select Field Customization */
.select-control {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
    transition: var(--transition-fast);
}

.form-control:focus ~ .select-arrow {
    color: var(--accent-purple);
    transform: rotate(180deg);
}

/* Textarea Customization */
.textarea-control {
    resize: vertical;
    min-height: 120px;
}

/* Custom Checkbox Design */
.checkbox-group {
    margin-top: 0.25rem;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    position: relative;
    cursor: pointer;
    user-select: none;
    gap: 0.75rem;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox {
    flex-shrink: 0;
    height: 20px;
    width: 20px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
    margin-top: 1px;
}

.checkbox-container:hover input ~ .custom-checkbox {
    border-color: var(--accent-purple);
}

.checkbox-container input:checked ~ .custom-checkbox {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    border-color: transparent;
}

.custom-checkbox::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.65rem;
    color: white;
    display: none;
}

.checkbox-container input:checked ~ .custom-checkbox::after {
    display: block;
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.text-link {
    color: var(--accent-teal);
    text-decoration: none;
    transition: var(--transition-fast);
    font-weight: 500;
    border-bottom: 1px dotted var(--accent-teal);
}

.text-link:hover {
    color: #22d3ee;
    border-bottom-style: solid;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 12px;
    padding: 0.95rem 1.5rem;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.loader {
    font-size: 1rem;
}

/* Hidden Class Utility */
.hidden {
    display: none !important;
}

/* Alerts and Status States */
.error-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 0.9rem 1.25rem;
    color: #fca5a5;
    font-size: 0.85rem;
    animation: shake 0.4s ease-in-out;
}

.info-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background-color: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 12px;
    padding: 0.9rem 1.25rem;
    color: #99f6e4;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: left;
    margin-top: 1rem;
}

.info-alert i {
    color: var(--accent-teal);
    font-size: 0.95rem;
    margin-top: 2px;
}

/* Success State Styles */
.status-state {
    text-align: center;
    padding: 2rem 0 1rem;
    animation: scale-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.status-state h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    color: #ffffff;
}

.status-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Animated Success Checkmark */
.success-icon-wrapper {
    display: flex;
    justify-content: center;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #ffffff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--accent-teal);
    animation: fill-checkmark 0.4s ease-in-out 0.4s forwards, scale-checkmark 0.3s ease-in-out 0.9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--accent-teal);
    fill: none;
    animation: stroke-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke-check 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Footer Styling */
.card-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(156, 163, 175, 0.4);
}

.card-footer p {
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    color: rgba(156, 163, 175, 0.5);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-teal);
}

/* Responsive Media Queries */
@media (max-width: 640px) {
    .card {
        padding: 1.75rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .app-title {
        font-size: 1.75rem;
    }
}

/* Keyframes Animations */
@keyframes float-slow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(40px, -30px) scale(1.1);
    }
}

@keyframes float-logo {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-6px);
    }
}

.animate-float {
    animation: float-logo 3s infinite alternate ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

@keyframes scale-up {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes stroke-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes stroke-check {
    to { stroke-dashoffset: 0; }
}

@keyframes fill-checkmark {
    to { box-shadow: inset 0px 0px 0px 40px var(--accent-teal); }
}

@keyframes scale-checkmark {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
