/**
 * Frontend Form Styles
 * Styling for custom feedback forms displayed via shortcode
 */

/* === Form Container === */
.custom-feedback-form-wrapper {
    max-width: 700px;
    margin: 32px auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* When form is inside modal, remove standalone styles */
.cfd-modal-body .custom-feedback-form-wrapper {
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* === Progress Bar === */
.custom-feedback-form-progress {
    margin-bottom: 32px;
}

.custom-feedback-form-progress-bar {
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 3px;
    transition: width 0.3s ease;
    margin-bottom: 12px;
}

.custom-feedback-form-progress-text {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.custom-feedback-form-progress-current {
    color: #3b82f6;
    font-weight: 700;
    font-size: 16px;
}

/* === Form Steps === */
.custom-feedback-form-step {
    display: none;
}

.custom-feedback-form-step.custom-feedback-form-active {
    display: block;
    animation: custom-feedback-form-fade-in 0.3s ease;
}

@keyframes custom-feedback-form-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-feedback-form-fields {
    margin-bottom: 32px;
}

/* === Text Input Fields === */
.cfd-text-field-wrapper,
.cfd-textarea-field-wrapper {
    margin-bottom: 24px;
}

.cfd-text-field-label,
.cfd-textarea-field-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.cfd-text-field-required,
.cfd-textarea-field-required {
    color: #dc2626;
}

.cfd-text-field-input,
.cfd-textarea-field-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #0f172a;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.cfd-text-field-input:hover,
.cfd-textarea-field-input:hover {
    border-color: #cbd5e1;
}

.cfd-text-field-input:focus,
.cfd-textarea-field-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cfd-textarea-field-input {
    resize: vertical;
    min-height: 100px;
}

/* === Form Buttons === */
.custom-feedback-form-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.custom-feedback-form-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.custom-feedback-form-btn-submit,
.custom-feedback-form-btn-next {
    background: #3b82f6;
    color: #ffffff;
}

.custom-feedback-form-btn-submit:hover,
.custom-feedback-form-btn-next:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.custom-feedback-form-btn-submit:active,
.custom-feedback-form-btn-next:active {
    transform: translateY(0);
}

.custom-feedback-form-btn-submit:disabled,
.custom-feedback-form-btn-next:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.custom-feedback-form-btn-back {
    background: #f1f5f9;
    color: #475569;
}

.custom-feedback-form-btn-back:hover {
    background: #e2e8f0;
}

/* === Success Message === */
.custom-feedback-form-success {
    text-align: center;
    padding: 48px 24px;
}

.custom-feedback-form-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #065f46;
    animation: custom-feedback-form-success-bounce 0.6s ease;
}

@keyframes custom-feedback-form-success-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.custom-feedback-form-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.custom-feedback-form-success p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* === Error Message === */
.custom-feedback-form-error {
    padding: 16px 20px;
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    border-radius: 6px;
    margin-bottom: 24px;
}

.custom-feedback-form-error-message {
    color: #991b1b;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* === Loading State === */
.custom-feedback-form-loading .custom-feedback-form-btn {
    position: relative;
    pointer-events: none;
}

.custom-feedback-form-loading .custom-feedback-form-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: custom-feedback-form-spin 0.6s linear infinite;
}

@keyframes custom-feedback-form-spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Field Validation === */
.custom-feedback-form-field-error input,
.custom-feedback-form-field-error textarea {
    border-color: #dc2626;
}

.custom-feedback-form-field-error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #dc2626;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .custom-feedback-form-wrapper {
        margin: 24px 16px;
        padding: 24px;
    }

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

    .custom-feedback-form-btn {
        width: 100%;
    }

    .custom-feedback-form-success-icon {
        width: 64px;
        height: 64px;
        font-size: 36px;
    }

    .custom-feedback-form-success h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .custom-feedback-form-wrapper {
        padding: 20px;
    }

    .custom-feedback-form-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* === Print Styles === */
@media print {
    .custom-feedback-form-wrapper {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }

    .custom-feedback-form-buttons {
        display: none;
    }
}
