/**
 * DPF Lead Form - Frontend Styles
 * Usuwanie DPF Kraków - usuwaniedpf.pl
 */

/* Reset i podstawy */
.dpf-form-container {
    max-width: 680px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.dpf-form {
    background: #ffffff;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Tytuł formularza */
.dpf-form-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 24px 0;
    text-align: center;
}

/* Kroki formularza */
.dpf-step {
    display: none;
}

.dpf-step.active {
    display: block;
}

/* Grupy pól */
.dpf-form-group {
    margin-bottom: 20px;
}

.dpf-form-row {
    display: flex;
    gap: 16px;
}

.dpf-form-group-half {
    flex: 1;
}

/* Etykiety */
.dpf-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.dpf-form-group .required {
    color: #e74c3c;
}

/* Pola tekstowe */
.dpf-form input[type="text"],
.dpf-form input[type="tel"],
.dpf-form input[type="email"],
.dpf-form select,
.dpf-form textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background: #ffffff;
    color: #1a1a2e;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.dpf-form input:focus,
.dpf-form select:focus,
.dpf-form textarea:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.dpf-form input::placeholder,
.dpf-form textarea::placeholder {
    color: #999;
}

/* Select z ikoną */
.dpf-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

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

/* Radio buttons */
.dpf-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dpf-radio-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: calc(50% - 5px);
}

.dpf-radio-label:hover {
    border-color: #e67e22;
    background: #fff8f3;
}

.dpf-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #e67e22;
    cursor: pointer;
}

.dpf-radio-label input[type="radio"]:checked + .dpf-radio-text {
    font-weight: 600;
    color: #e67e22;
}

.dpf-radio-text {
    font-size: 14px;
    color: #333;
}

/* Checkbox - Urgent Box */
.dpf-checkbox-label {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dpf-checkbox-label.urgent-box {
    background: #fff8f3;
    border: 2px solid #f5c6a5;
}

.dpf-checkbox-label.urgent-box:hover {
    background: #ffede0;
    border-color: #e67e22;
}

.dpf-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: #e67e22;
    cursor: pointer;
}

.dpf-checkbox-text {
    font-size: 15px;
    font-weight: 500;
    color: #c0392b;
}

/* Przyciski */
.dpf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dpf-btn-next,
.dpf-btn-submit {
    width: 100%;
    background: #e67e22;
    color: #ffffff;
}

.dpf-btn-next:hover,
.dpf-btn-submit:hover {
    background: #d35400;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.dpf-btn-back {
    background: #f4f4f4;
    color: #666;
    padding: 16px 24px;
}

.dpf-btn-back:hover {
    background: #e8e8e8;
}

.dpf-form-buttons {
    display: flex;
    gap: 12px;
}

.dpf-form-buttons .dpf-btn-submit {
    flex: 1;
}

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

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

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

/* Stan ładowania */
.dpf-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.dpf-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: dpf-spin 0.8s linear infinite;
    margin-left: 10px;
}

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

/* Responsywność */
@media (max-width: 600px) {
    .dpf-form {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .dpf-form-title {
        font-size: 20px;
    }

    .dpf-form-row {
        flex-direction: column;
        gap: 0;
    }

    .dpf-radio-label {
        min-width: 100%;
    }

    .dpf-form-buttons {
        flex-direction: column-reverse;
    }

    .dpf-btn-back {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dpf-form {
        background: #1e1e2e;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    }

    .dpf-form-title {
        color: #ffffff;
    }

    .dpf-form-group label {
        color: #e0e0e0;
    }

    .dpf-form input[type="text"],
    .dpf-form input[type="tel"],
    .dpf-form input[type="email"],
    .dpf-form select,
    .dpf-form textarea {
        background: #2a2a3e;
        border-color: #3d3d5c;
        color: #ffffff;
    }

    .dpf-form input:focus,
    .dpf-form select:focus,
    .dpf-form textarea:focus {
        border-color: #e67e22;
    }

    .dpf-radio-label {
        background: #2a2a3e;
        border-color: #3d3d5c;
    }

    .dpf-radio-label:hover {
        background: #35354a;
    }

    .dpf-radio-text {
        color: #e0e0e0;
    }

    .dpf-checkbox-label.urgent-box {
        background: #3a2a1e;
        border-color: #5a3a2e;
    }

    .dpf-btn-back {
        background: #3d3d5c;
        color: #e0e0e0;
    }

    .dpf-btn-back:hover {
        background: #4d4d6c;
    }
}
