/* Floating Button */
#qfp-floating-button {
    position: fixed;
    z-index: 9998;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    max-width: 300px;
    text-align: center;
    line-height: 1.4;
}

#qfp-floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.qfp-button-bottom-right {
    bottom: 30px;
    right: 30px;
}

.qfp-button-bottom-left {
    bottom: 30px;
    left: 30px;
}

.qfp-button-top-right {
    top: 30px;
    right: 30px;
}

.qfp-button-top-left {
    top: 30px;
    left: 30px;
}

/* Modal */
.qfp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: qfpFadeIn 0.3s;
}

.qfp-modal.qfp-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes qfpFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.qfp-modal-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: qfpSlideUp 0.3s;
}

@keyframes qfpSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.qfp-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.qfp-close:hover {
    color: #333;
}

/* Progress Bar */
.qfp-progress-container {
    width: 100%;
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 0%, #e8e8e8 100%);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #d0d0d0;
}

.qfp-progress-bar {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    border-radius: 12px;
    background: linear-gradient(90deg, 
        var(--qfp-primary-color, #0073aa) 0%, 
        var(--qfp-primary-light, #0095dd) 100%);
    box-shadow: 0 0 15px rgba(0, 115, 170, 0.5);
    animation: qfpPulse 2s ease-in-out infinite;
}

@keyframes qfpPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 115, 170, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 115, 170, 0.8);
    }
}

.qfp-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: qfpShine 2s linear infinite;
}

@keyframes qfpShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.qfp-progress-text {
    font-size: 11px;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Form Steps */
.qfp-step {
    display: none;
    animation: qfpSlideIn 0.3s;
}

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

@keyframes qfpSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.qfp-step h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
    font-weight: 700;
}

.qfp-subtitle {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.qfp-question {
    margin-bottom: 30px;
}

.qfp-question > label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.qfp-required {
    color: #dc3545;
    margin-left: 4px;
    font-weight: bold;
}

/* Options */
.qfp-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qfp-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.qfp-option:hover {
    border-color: #0073aa;
    background-color: #f8f9fa;
}

.qfp-option input {
    margin: 0;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0073aa;
}

.qfp-option input:checked + span {
    font-weight: 600;
    color: #0073aa;
}

.qfp-option span {
    flex: 1;
    font-size: 15px;
    color: #333;
}

/* Contact Fields */
.qfp-contact-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.qfp-field label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.qfp-field input,
.qfp-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.qfp-field input:focus,
.qfp-field textarea:focus {
    outline: none;
    border-color: #0073aa;
}

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

/* Buttons */
.qfp-button-group {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.qfp-next-btn,
.qfp-prev-btn,
.qfp-submit-btn,
.qfp-close-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qfp-next-btn,
.qfp-submit-btn,
.qfp-close-btn {
    background-color: #0073aa;
    color: #fff;
    flex: 1;
}

.qfp-next-btn:hover,
.qfp-submit-btn:hover,
.qfp-close-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.qfp-prev-btn {
    background-color: #f0f0f0;
    color: #333;
    padding: 14px 25px;
}

.qfp-prev-btn:hover {
    background-color: #e0e0e0;
}

/* Success Step */
.qfp-success-step {
    text-align: center;
    padding: 20px 0;
}

.qfp-success-icon {
    font-size: 80px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: qfpCheckMark 0.5s ease;
}

@keyframes qfpCheckMark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.qfp-success-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.qfp-success-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.qfp-close-btn {
    display: inline-block;
    min-width: 200px;
}

/* Loading */
.qfp-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.qfp-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: qfpSpin 1s linear infinite;
}

@keyframes qfpSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    #qfp-floating-button {
        font-size: 14px;
        padding: 12px 20px;
        max-width: 250px;
    }
    
    .qfp-button-bottom-right,
    .qfp-button-top-right {
        right: 15px;
    }
    
    .qfp-button-bottom-left,
    .qfp-button-top-left {
        left: 15px;
    }
    
    .qfp-button-bottom-right,
    .qfp-button-bottom-left {
        bottom: 15px;
    }
    
    .qfp-button-top-right,
    .qfp-button-top-left {
        top: 15px;
    }
    
    .qfp-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }
    
    .qfp-step h2 {
        font-size: 24px;
    }
    
    .qfp-subtitle {
        font-size: 14px;
    }
    
    .qfp-question > label {
        font-size: 16px;
    }
    
    .qfp-button-group {
        flex-direction: column;
    }
    
    .qfp-prev-btn {
        order: 2;
    }
    
    .qfp-next-btn,
    .qfp-submit-btn {
        order: 1;
    }
}

/* Validation */
input:invalid,
textarea:invalid {
    border-color: #e0e0e0;
}

input:invalid:focus,
textarea:invalid:focus {
    border-color: #0073aa;
}

.qfp-error {
    border-color: #dc3545 !important;
}

.qfp-error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.qfp-error-message.qfp-active {
    display: block;
}
