/* ==========================================================================
   Stellplatz Mobile QR Page - Modern Dark Glassmorphic Styling
   ========================================================================== */

:root {
    --bg-dark: #090d16;
    --card-bg: rgba(15, 23, 42, 0.82);
    --card-border: rgba(255, 255, 255, 0.12);
    --input-bg: rgba(30, 41, 59, 0.7);
    --input-border: rgba(255, 255, 255, 0.15);
    --input-focus: #3b82f6;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --success-green: #10b981;
    --error-red: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 99, 235, 0.1);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Glowing Orbs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.orb-1 {
    width: 280px;
    height: 280px;
    background: #1d4ed8;
    top: -50px;
    left: -50px;
}

.orb-2 {
    width: 260px;
    height: 260px;
    background: #4f46e5;
    bottom: -60px;
    right: -60px;
}

/* Main Container */
.app-container {
    width: 100%;
    max-width: 440px;
    z-index: 1;
}

/* Card Styling */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow-card);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header Badge */
.header-badge {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-wrapper {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.3) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    flex-shrink: 0;
}

.badge-text h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    line-height: 1.2;
}

.badge-text p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.price-badge {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 6px;
    letter-spacing: 0.2px;
}

/* Alert Banner */
.alert {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert.error {
    background-color: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert.success {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Honeypot field (hidden) */
.hp-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    overflow: hidden;
}

/* Form Controls */
.request-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.required {
    color: var(--accent-blue);
}

.optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 0 14px 0 44px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    border-color: var(--input-focus);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--accent-blue);
}

/* Browser Autofill Styling Override */
.input-wrapper input:-webkit-autofill,
.input-wrapper input:-webkit-autofill:hover,
.input-wrapper input:-webkit-autofill:focus,
.input-wrapper input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    transition: background-color 5000s ease-in-out 0s;
    border-color: var(--input-focus) !important;
}

.field-error {
    font-size: 12px;
    color: var(--error-red);
    margin-top: 2px;
    display: none;
}

.field-error.active {
    display: block;
}

/* Pill Selector for Streets */
.pill-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.pill-btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-secondary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 calc(50% - 6px);
    min-height: 44px;
    text-align: center;
}

.pill-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.pill-btn.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, rgba(29, 78, 216, 0.4) 100%);
    border-color: #3b82f6;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

#otherPill {
    flex: 1 1 100%;
}

/* Custom Street Animation Wrapper */
.custom-street-wrapper {
    max-height: 80px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.custom-street-wrapper.hidden {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.margin-top-sm {
    margin-top: 6px;
}

/* Submit Section */
.submit-section {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rate-limit-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.submit-btn {
    width: 100%;
    height: 52px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    animation: rotate 1.5s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Success Card */
.success-card {
    text-align: center;
    padding: 36px 24px;
}

.success-icon-animated {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.success-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 24px;
}

.summary-box {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.s-label {
    color: var(--text-muted);
}

.s-val {
    color: var(--text-primary);
    font-weight: 600;
}

.cooldown-timer-box {
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.cooldown-timer-box strong {
    color: var(--accent-blue);
}

.hidden {
    display: none !important;
}
