/* Publiczny formularz zapytania Special (special-form.php). */
/* Zmienne kolorystyczne (jak w index.php) */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow-color: rgba(0,0,0,0.1);
}

/* Reset i podstawowe style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

/* Hero Section */
.hero {
    padding: 3rem 1rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--danger-color), #e74c3c);
    color: white;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Formularz */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    margin-bottom: 3rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--danger-color);
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

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

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

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Przycisk */
.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

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

/* Info box */
.info-box {
    background: var(--light-color);
    border-left: 4px solid var(--danger-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
}

.info-box h4 {
    color: var(--danger-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.info-box ul {
    margin-left: 1.5rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateX(-2px);
}

/* Animacje */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container {
    animation: fadeInUp 0.6s ease forwards;
}

/* Błędy pól */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger-color);
}

.field-error {
    display: block;
    margin-top: 0.4rem;
    color: #721c24;
    font-size: 0.9rem;
    font-weight: 500;
}

.field-error:empty {
    display: none;
}

.field-hint {
    display: block;
    margin-top: 0.4rem;
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.field-hint--counter {
    text-align: right;
}

.required-legend {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Jak to działa */
.how-it-works {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.how-it-works li {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 6px var(--shadow-color);
}

.how-it-works strong {
    color: var(--danger-color);
    margin-right: 0.25rem;
}

@media (min-width: 768px) {
    .how-it-works {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Komunikat nad formularzem: co poszło nie tak, co zrobić i jak się z nami skontaktować */
.is-hidden {
    display: none;
}

.form-alert {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.form-alert:focus {
    outline: 3px solid rgba(220, 53, 69, 0.35);
}

.form-alert__title {
    font-weight: 600;
}

.form-alert__list {
    margin: 0.75rem 0 0 1.25rem;
}

.form-alert__list:empty {
    display: none;
}

.form-alert__list li {
    margin-bottom: 0.35rem;
}

.form-alert__list a {
    color: inherit;
    font-weight: 600;
}

.form-alert__help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f5c6cb;
}

.chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.2rem;
    background: var(--dark-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.chat-btn:hover {
    background: #23272b;
}

.chat-btn--secondary {
    background: white;
    color: var(--dark-color);
    border: 2px solid var(--dark-color);
}

.chat-btn--secondary:hover {
    background: var(--light-color);
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary-color);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.form-footnote {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--secondary-color);
}

/* Pułapka na boty: poza ekranem, niewidoczna dla ludzi i czytników */
.form-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

/* Potwierdzenie po wysłaniu */
.sent-panel {
    text-align: center;
    padding: 1rem 0;
}

.sent-panel h2 {
    color: #155724;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.sent-panel__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #d4edda;
    color: #155724;
    font-size: 2rem;
    line-height: 64px;
}

.next-steps {
    max-width: 560px;
    margin: 1.5rem auto;
    padding-left: 1.5rem;
    text-align: left;
}

.next-steps li {
    margin-bottom: 0.9rem;
}

.sent-panel__note {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.sent-panel__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.sent-panel__actions .back-btn {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .form-container {
        animation: none;
    }
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: inherit;
}
