/* ==========================================================================
   STRONA REKLAMACJE - FORMULARZ ZGŁOSZENIOWY
   Bazuje na zmiennych i układzie contact-custom.css
   ========================================================================== */

.complaints-form-wrapper {
    background-color: #ffffff;
    border-radius: clamp(20px, 3vw, 32px);
    padding: clamp(24px, 4vw, 48px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

/* Fieldset / Legend */
.cf-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 clamp(24px, 3vw, 36px) 0;
}

.cf-legend {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 12px;
    margin-bottom: clamp(16px, 2vw, 24px);
    border-bottom: 2px solid #306EB5;
    width: 100%;
    display: block;
}

/* Grid layouts */
.cf-grid {
    display: grid;
    gap: clamp(12px, 2vw, 20px);
    margin-bottom: clamp(12px, 2vw, 16px);
}

.cf-grid-2 { grid-template-columns: repeat(2, 1fr); }
.cf-grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
    .cf-grid-2, .cf-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Fields */
.cf-field {
    margin-bottom: clamp(12px, 1.5vw, 16px);
}

.cf-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.cf-field input[type="text"],
.cf-field input[type="email"],
.cf-field input[type="tel"],
.cf-field input[type="date"],
.cf-field textarea,
.cf-field select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    color: #1e293b;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cf-field input:focus,
.cf-field textarea:focus,
.cf-field select:focus {
    border-color: #306EB5;
    box-shadow: 0 0 0 3px rgba(48, 110, 181, 0.1);
    background-color: #ffffff;
}

.cf-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Readonly field (date) */
.cf-readonly {
    background-color: #e2e8f0 !important;
    color: #64748b !important;
    cursor: not-allowed;
    opacity: 0.8;
}

/* File inputs */
.cf-field-file input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.cf-field-file input[type="file"]:hover {
    border-color: #306EB5;
}

.cf-file-hint {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Radio & Checkbox groups */
.cf-radio-group, .cf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

.cf-radio-inline {
    flex-direction: row;
    gap: 20px;
}

.cf-radio, .cf-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #374151;
    cursor: pointer;
}

.cf-radio input, .cf-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #306EB5;
    cursor: pointer;
}

/* Required indicator */
.required {
    color: #ef4444;
    font-weight: 700;
}

/* Consent */
.cf-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: clamp(16px, 2vw, 24px) 0;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cf-consent input[type="checkbox"] {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: #306EB5;
    cursor: pointer;
    flex-shrink: 0;
}

.cf-consent label {
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    cursor: pointer;
}

.cf-consent label a {
    color: #306EB5;
    font-weight: 600;
    text-decoration: none;
}

.cf-consent label a:hover {
    text-decoration: underline;
}

/* Attachments notice */
.cf-attachments-notice {
    background-color: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin-bottom: clamp(16px, 2vw, 24px);
    font-size: 14px;
    color: #991b1b;
    line-height: 1.5;
}

/* Turnstile */
.complaints-form .cf-turnstile {
    max-width: 100%;
    overflow: hidden;
}

/* Submit button - reuses contact page pattern */
.complaints-submit-btn {
    width: 100%;
    background: linear-gradient(90deg, #2A3E93 0%, #306EB5 100%);
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(42, 62, 147, 0.3);
}

.complaints-submit-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 62, 147, 0.4);
    color: #ffffff !important;
}

.complaints-submit-btn svg {
    width: 16px;
    height: 16px;
    fill: #ffffff !important;
}

/* Submit row - Captcha + Button inline */
.cf-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: clamp(16px, 2vw, 24px);
}

.cf-submit-row .cf-turnstile {
    margin: 0;
    flex-shrink: 0;
}

.cf-submit-row .complaints-submit-btn {
    width: auto;
    padding: 16px 40px;
    margin-left: auto;
}

@media (max-width: 640px) {
    .cf-submit-row {
        flex-direction: column;
        align-items: stretch;
    }
    .cf-submit-row .complaints-submit-btn {
        width: 100%;
        margin-left: 0;
    }
}

/* Conditional fields transition */
.cf-fieldset-conditional {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cf-field input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   STRONA PODSUMOWANIA REKLAMACJI
   ========================================================================== */
.complaints-summary-box {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 40px);
}

.summary-icon {
    color: #22c55e;
    margin-bottom: 24px;
}

.summary-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.summary-text {
    font-size: clamp(16px, 1.5vw, 18px);
    color: #475569;
    line-height: 1.6;
    margin-bottom: 32px;
}

.summary-details {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    display: inline-block;
    text-align: left;
}

.summary-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.summary-detail-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.detail-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    min-width: 180px;
}

.detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.summary-info {
    background-color: #eaf2fb;
    border-left: 4px solid #306EB5;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin-bottom: 32px;
    text-align: left;
}

.summary-info p {
    font-size: 15px;
    color: #1e293b;
    line-height: 1.6;
    margin: 0;
}
