/* SCDev FluidForm Pro - Frontend Styles */

/* Q&A Display Section */
.scdev-ff-qna-display {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px auto;
    max-width: 800px;
}

.scdev-ff-qna-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
}

.scdev-ff-qna-question {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.scdev-ff-qna-answer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.scdev-ff-qna-answer p {
    margin: 0;
    line-height: 1.6;
    color: white;
    font-size: 15px;
}

.scdev-ff-qna-answer div {
    margin: 0;
    line-height: 1.6;
    color: white;
    font-size: 15px;
    flex: 1;
}

.scdev-ff-qna-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

/* Alternative clean style - uncomment to use */
/*
.scdev-ff-qna-item {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scdev-ff-qna-question {
    color: #1f2937;
}

.scdev-ff-qna-answer {
    background: white;
    border: 1px solid #e5e7eb;
}

.scdev-ff-qna-answer p {
    color: #4b5563;
}

.scdev-ff-qna-icon {
    background: #667eea;
    color: white;
}
*/

/* Rating Field */
.scdev-ff-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    align-items: center;
}

.scdev-ff-rating input {
    display: none;
}

.scdev-ff-rating .scdev-ff-star {
    font-size: 36px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    user-select: none;
}

.scdev-ff-rating input:checked ~ .scdev-ff-star,
.scdev-ff-rating .scdev-ff-star:hover,
.scdev-ff-rating .scdev-ff-star:hover ~ .scdev-ff-star {
    color: #ffc107;
    transform: scale(1.1);
}

.scdev-ff-rating input:checked ~ .scdev-ff-star {
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Slider Field */
.scdev-ff-slider-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

.scdev-ff-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
}

.scdev-ff-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.scdev-ff-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.scdev-ff-slider-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

/* Radio & Checkbox Groups */
.scdev-ff-radio-group,
.scdev-ff-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.scdev-ff-radio-label,
.scdev-ff-checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 6px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
    background: #ffffff;
}

.scdev-ff-radio-label:hover,
.scdev-ff-checkbox-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateX(4px);
}

.scdev-ff-radio-label input:checked + span,
.scdev-ff-checkbox-label input:checked ~ span {
    font-weight: 600;
    color: #667eea;
}

.scdev-ff-radio-label input,
.scdev-ff-checkbox-label input {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: #667eea;
}

.scdev-ff-checkbox-label span {
    font-size: 15px;
    color: #374151;
}

@media (prefers-color-scheme: dark) {
    .scdev-ff-radio-label,
    .scdev-ff-checkbox-label {
        background: #ffffff;
        border-color: #374151;
    }
    
    .scdev-ff-radio-label:hover,
    .scdev-ff-checkbox-label:hover {
        background: #f8f9ff;
        border-color: #667eea;
    }
    
    .scdev-ff-checkbox-label span {
        color: #374151;
    }
    
    .scdev-ff-radio-label input:checked + span,
    .scdev-ff-checkbox-label input:checked ~ span {
        color: #667eea;
    }
}

/* Tags Input */
.scdev-ff-tags {
    border: 2px dashed #ddd !important;
}

.scdev-ff-tags:focus {
    border-color: #667eea !important;
    border-style: solid !important;
}

/* Date & Time Pickers */
input[type="date"],
input[type="time"],
input[type="number"] {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    height: auto;
    min-height: 46px;
    width: 100%;
}

/* Override base plugin inline date/time layout */
.scdev-ff-field:has(input[type="date"]),
.scdev-ff-field:has(input[type="time"]) {
    display: block !important;
    width: 100% !important;
    margin-left: 0 !important;
}

/* Center labels for date, time, number fields */
.scdev-ff-field:has(input[type="date"]) label,
.scdev-ff-field:has(input[type="time"]) label,
.scdev-ff-field:has(input[type="number"]) label {
    text-align: left;
}

/* Date/Time inline layout */
.scdev-ff-datetime-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.scdev-ff-datetime-group .scdev-ff-field label{
    margin-bottom: 2px !important;
}

/* Select Dropdown */
select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* PayPal Payment Field */
.scdev-ff-paypal-wrap {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    position: relative;
    z-index: 10;
}

/* Hide submit button when PayPal field is present */
.scdev-fluidform:has(.scdev-ff-paypal-wrap) .scdev-ff-submit {
    display: none;
}

/* Hide submit button when only dropdown is present (no other input fields) */
.scdev-fluidform:has(select):not(:has(input[type="text"])):not(:has(input[type="email"])):not(:has(input[type="tel"])):not(:has(textarea)) .scdev-ff-submit {
    display: none;
}

/* Hide submit button when only checkboxes are present (no other input fields) */
.scdev-fluidform:has(.scdev-ff-checkbox-group):not(:has(input[type="text"])):not(:has(input[type="email"])):not(:has(input[type="tel"])):not(:has(textarea)):not(:has(select)) .scdev-ff-submit {
    display: none;
}

.scdev-ff-paypal-form {
    position: relative;
    z-index: 11;
}

.scdev-ff-paypal-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #0ea5e9;
}

.scdev-ff-paypal-item {
    font-size: 16px;
    font-weight: 600;
    color: #0c4a6e;
}

.scdev-ff-paypal-amount {
    font-size: 24px;
    font-weight: bold;
    color: #0c4a6e;
}

.scdev-ff-paypal-btn {
    width: 100%;
    background: #0070ba;
    color: white;
    border: none;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scdev-ff-paypal-btn:hover {
    background: #005ea6;
}

/* Newsletter Signup Field */
.scdev-ff-newsletter-wrap {
    background: #eff6ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
}

.scdev-ff-newsletter-label {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 12px 0;
    text-align: center;
}

.scdev-ff-newsletter-input-group {
    margin-bottom: 12px;
}

.scdev-ff-newsletter-email {
    width: 100%;
    padding: 12px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    font-size: 15px;
}

.scdev-ff-newsletter-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #1e40af;
    cursor: pointer;
    margin-bottom: 12px;
}

.scdev-ff-newsletter-consent input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.scdev-ff-newsletter-footer {
    text-align: center;
    font-size: 14px;
    color: #1e40af;
    margin: 12px 0 0 0;
    font-weight: 500;
}

/* Poll Results */
.scdev-ff-poll-results {
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.scdev-ff-poll-item {
    margin-bottom: 15px;
    transition: all 0.2s;
}

.scdev-ff-poll-item[style*="cursor:pointer"]:hover {
    background: #f3f4f6;
    border-radius: 6px;
    padding: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.scdev-ff-poll-item:last-child {
    margin-bottom: 0;
}

.scdev-ff-poll-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
    color: #374151;
}

.scdev-ff-poll-percent {
    font-weight: 600;
    color: #10b981;
}

.scdev-ff-poll-bar {
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 4px;
}

.scdev-ff-poll-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
}

.scdev-ff-poll-votes {
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .scdev-ff-paypal-wrap {
        border-color: #f59e0b;
    }
    
    .scdev-ff-newsletter-wrap {
        border-color: #3b82f6;
    }
    
    .scdev-ff-poll-results {
        background: #1f2937;
        border-color: #374151;
    }
    
    .scdev-ff-poll-item[style*="cursor:pointer"]:hover {
        background: #374151;
    }
    
    .scdev-ff-poll-label {
        color: #e5e7eb;
    }
    
    .scdev-ff-poll-bar {
        background: #374151;
    }
    
    .scdev-ff-poll-votes {
        color: #9ca3af;
    }
}
