/**
 * BPC Forms - Style CSS
 */

/* Wrapper formularza */
.bpc-form-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bpc-form-wrapper * {
    box-sizing: border-box;
}

/* Formularz */
.bpc-form {
    width: 100%;
}

/* Sekcja formularza */
.bpc-form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e5e5e5;
}

.bpc-form-section:last-of-type {
    border-bottom: none;
}

/* Tytuł sekcji */
.bpc-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* Pytania w sekcji */
.bpc-section-questions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Pole formularza */
.bpc-form-field {
    margin-bottom: 15px;
}

/* Etykieta pola */
.bpc-field-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 8px;
}

/* Oznaczenie wymaganego pola */
.bpc-required-mark {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 3px;
}

/* Tekst pomocniczy */
.bpc-field-help {
    font-size: 14px;
    color: #7f8c8d;
    margin: 5px 0;
    font-style: italic;
}

/* Wrapper dla inputa */
.bpc-field-input {
    margin-top: 8px;
}

/* Podstawowe style dla inputów */
.bpc-input,
.bpc-textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid #dfe6e9;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-family: inherit;
    background-color: #ffffff;
}

.bpc-input:focus,
.bpc-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Textarea */
.bpc-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Radio buttons */
.bpc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bpc-radio-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 2px solid #dfe6e9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.bpc-radio-label:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.bpc-radio {
    margin: 0;
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.bpc-radio-label span {
    flex: 1;
}

/* Checkboxes */
.bpc-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bpc-checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 2px solid #dfe6e9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.bpc-checkbox-label:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.bpc-checkbox {
    margin: 0;
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.bpc-checkbox-label span {
    flex: 1;
}

/* Przycisk submit */
.bpc-form-submit {
    margin-top: 30px;
    text-align: center;
}

.bpc-submit-button {
    background-color: #3498db;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.bpc-submit-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

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

.bpc-submit-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loader */
.bpc-form-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-size: 16px;
    margin-left: 15px;
}

.bpc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #dfe6e9;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: bpc-spin 0.8s linear infinite;
}

@keyframes bpc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Komunikaty */
.bpc-form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}

.bpc-form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.bpc-form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Błędy walidacji */
.bpc-form-field.error .bpc-input,
.bpc-form-field.error .bpc-textarea {
    border-color: #e74c3c;
}

.bpc-form-field.error .bpc-field-label {
    color: #e74c3c;
}

.bpc-field-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

/* Responsywność */
@media (max-width: 768px) {
    .bpc-form-wrapper {
        padding: 15px;
    }

    .bpc-section-title {
        font-size: 20px;
    }

    .bpc-field-label {
        font-size: 15px;
    }

    .bpc-input,
    .bpc-textarea {
        font-size: 14px;
        padding: 10px 12px;
    }

    .bpc-submit-button {
        width: 100%;
        font-size: 16px;
        padding: 12px 30px;
    }

    .bpc-form-loader {
        display: block;
        margin-top: 15px;
        margin-left: 0;
    }
}

/* Błąd formularza */
.bpc-form-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border: 2px solid #f5c6cb;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

/* Sekcja zgód */
.bpc-form-consents {
    margin: 30px 0;
    padding: 25px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

.bpc-consents-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* Pole zgody */
.bpc-consent-field {
    margin-bottom: 15px;
}

.bpc-consent-field:last-child {
    margin-bottom: 0;
}

.bpc-consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 15px;
    border: 2px solid #dfe6e9;
    border-radius: 6px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.bpc-consent-label:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.bpc-consent-checkbox {
    margin: 0;
    margin-right: 12px;
    margin-top: 2px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.bpc-consent-text {
    flex: 1;
    line-height: 1.5;
    color: #34495e;
    font-size: 15px;
}

.bpc-consent-field.bpc-required .bpc-consent-text {
    font-weight: 500;
}

/* Oznaczenie wymaganej zgody */
.bpc-consent-field .bpc-required-mark {
    color: #e74c3c;
    font-weight: bold;
    margin-left: 5px;
}

/* Błędy zgód */
.bpc-consent-field.error .bpc-consent-label {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.bpc-consent-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}

/* Responsywność dla zgód */
@media (max-width: 768px) {
    .bpc-form-consents {
        padding: 20px 15px;
        margin: 25px 0;
    }

    .bpc-consents-title {
        font-size: 18px;
    }

    .bpc-consent-label {
        padding: 12px;
    }

    .bpc-consent-text {
        font-size: 14px;
    }
}
