/**
 * Style dla formularzy kontaktowych
 * 
 * @package ContactForm
 */

/* Wrapper formularza */
.cf-form-wrapper {
    /* max-width: 600px;
    margin: 0 auto; */
    position: relative;
}

/* Formularz */
.cf-form {
    /* padding: 20px; */
    position: relative;
}

/* Komunikaty */
.cf-form-messages {
    margin-bottom: 20px;
}

.cf-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.cf-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cf-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Pola formularza */
.cf-field-wrapper {
    padding: 10px 0;
    margin-bottom: 20px;
}

.cf-field-wrapper.-textarea {
    padding-top: 0;
    margin-top: 10px;
}

.cf-field-wrapper label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #888888;
    font-size: 14px;
}

.cf-field-wrapper label .required {
    color: #dc3545;
}

.cf-field-wrapper input[type="text"],
.cf-field-wrapper input[type="email"],
.cf-field-wrapper input[type="tel"],
.cf-field-wrapper input[type="url"],
.cf-field-wrapper input[type="number"],
.cf-field-wrapper input[type="date"],
.cf-field-wrapper textarea,
.cf-field-wrapper select {
    width: 100%;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid #777771;
    border-radius: 0;
    transition: border-color 0.3s ease;
}


.cf-field-wrapper textarea {
    padding: 30px 12px 10px 12px;
    border: 1px solid #777771;
}

.cf-field-wrapper input[type="text"]:focus,
.cf-field-wrapper input[type="email"]:focus,
.cf-field-wrapper input[type="tel"]:focus,
.cf-field-wrapper input[type="url"]:focus,
.cf-field-wrapper input[type="number"]:focus,
.cf-field-wrapper input[type="date"]:focus,
.cf-field-wrapper textarea:focus,
.cf-field-wrapper select:focus {
    outline: none;
    border-bottom-color: #17A8E3;
    /* border-color: #007bff; */
}

.cf-field-wrapper input[type="text"]:focus label,
.cf-field-wrapper input[type="email"]:focus label,
.cf-field-wrapper input[type="tel"]:focus label,
.cf-field-wrapper input[type="url"]:focus label,
.cf-field-wrapper input[type="number"]:focus label,
.cf-field-wrapper input[type="date"]:focus label,
.cf-field-wrapper textarea:focus label,
.cf-field-wrapper select:focus label {
    color: #17A8E3;
}

/* Pole z błędem */
.cf-field-invalid {
    border-color: #dc3545 !important;
    border-bottom-color: #dc3545 !important;
}

.cf-field-error {
    display: block;
    margin-top: 5px;
    color: #dc3545;
    font-size: 13px;
}

/* Textarea */
.cf-field-wrapper textarea {
    min-height: 120px;
    resize: vertical;
}

/* Checkbox i radio */
.cf-field-wrapper input[type="checkbox"],
.cf-field-wrapper input[type="radio"] {
    margin-right: 5px;
}

/* Przycisk wysyłki */
.cf-submit-wrapper {
    margin-top: 25px;
}

.cf-submit-button {
    background-color: #007bff;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cf-submit-button:hover {
    background-color: #0056b3;
}

.cf-submit-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.cf-submit-button.loading {
    position: relative;
    color: transparent;
}

.cf-submit-button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: cf-spinner 0.6s linear infinite;
}

@keyframes cf-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Notatka informacyjna */
.cf-notice {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

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

    .cf-submit-button {
        width: 100%;
    }
}

/* Style dla plików */
.cf-field-wrapper input[type="file"] {
    padding: 5px;
}

/* Style dla select */
.cf-field-wrapper select {
    cursor: pointer;
    background-color: #fff;
}

/* Pomocnicze klasy */
.cf-field-inline {
    display: inline-block;
    margin-right: 15px;
}

.cf-field-group {
    display: flex;
    gap: 15px;
}

.cf-field-group .cf-field-wrapper {
    flex: 1;
}
.cf-field-wrapper legend {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #888888;
    font-size: 14px;
}

.cf-field-wrapper .cf-radio-option,
.cf-field-wrapper .cf-checkbox-option {
    margin-bottom: 8px;
}

.cf-field-wrapper .cf-radio-option input,
.cf-field-wrapper .cf-checkbox-option input {
    position: absolute;
    z-index: -1;
    opacity: 0;
    visibility: hidden;
}
.cf-field-wrapper .cf-radio-option input + label,
.cf-field-wrapper .cf-checkbox-option input + label {
    font-size: 16px;
    color: #333333;
    position: relative;
    display: flex;
    align-self: flex-start;
    justify-content: flex-start;
    gap: 10px;
}
.cf-field-wrapper .cf-radio-option input + label:after,
.cf-field-wrapper .cf-checkbox-option input + label:after,
.cf-field-wrapper .cf-radio-option input + label:before,
.cf-field-wrapper .cf-checkbox-option input + label:before {
    content: '';
    display: inline-block;
    transition: all 0.3s ease;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
}
.cf-field-wrapper .cf-radio-option input + label:before,
.cf-field-wrapper .cf-checkbox-option input + label:before {
    border: 1px solid #777771;
    margin-top: 3px;
}
.cf-field-wrapper .cf-radio-option input + label:after,
.cf-field-wrapper .cf-checkbox-option input + label:after {
    position: absolute;
    top: 7px;
    left: 4px;
    width: 10px;
    height: 10px;
    background-color: #17A8E3;
    opacity: 0;
    visibility: hidden;
    border: 0;
}
.cf-field-wrapper .cf-radio-option input:checked + label:after,
.cf-field-wrapper .cf-checkbox-option input:checked + label:after {
    opacity: 1;
    visibility: visible;
}
.cf-field-wrapper .cf-radio-option input:checked + label:before,
.cf-field-wrapper .cf-checkbox-option input:checked + label:before {
    border: 1px solid #17A8E3;
}
.cf-field-wrapper .cf-radio-option input + label:after,
.cf-field-wrapper .cf-radio-option input + label:before {
    border-radius: 100%;
}