/* Container Styling */
#ffp-form-container {
    max-width: 650px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* Progress Bar Container */
.ffp-progress-container {
    margin-bottom: 10px;
}

.ffp-progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ffp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.ffp-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-align: right;
    letter-spacing: 0.5px;
}

/* Hide steps by default */
.ffp-step {
    display: none;
}

.ffp-step.active {
    display: block;
    animation: fadeInSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.ffp-step h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.3;
}

/* Modern Inputs */
.ffp-step input[type="text"],
.ffp-step input[type="email"],
.ffp-step input[type="number"] {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    color: #334155;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.ffp-step input[type="text"]:focus,
.ffp-step input[type="email"]:focus,
.ffp-step input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Grid for Image Cards */
.ffp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Image Card Styling */
.ffp-card {
    cursor: pointer;
    position: relative;
    display: block;
}

.ffp-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ffp-card-content {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    background: #ffffff;
    transition: all 0.25s ease;
    overflow: hidden;
}

.ffp-card-content img {
    width: 100%;
    height: 150px !important;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
  .ffp-card-content img {
    width: 100%;
    height: 250px !important;
  }
}

.ffp-card-content span {
    display: block;
    font-weight: 600;
    color: #475569;
    font-size: 15px;
}

/* Image Card Hover & Checked States */
.ffp-card:hover .ffp-card-content {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.ffp-card input[type="radio"]:checked + .ffp-card-content {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 2px #3b82f6, 0 8px 20px rgba(59, 130, 246, 0.15);
}

.ffp-card input[type="radio"]:checked + .ffp-card-content span {
    color: #1d4ed8;
}

/* Navigation Buttons */
.ffp-navigation {
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.ffp-navigation button {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

/* Primary Button (Next / Submit) */
.next-step, #ffp-submit {
    background: #0f172a;
    color: #ffffff;
    flex: 2;
}

.next-step:hover:not(:disabled), #ffp-submit:hover:not(:disabled) {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(15, 23, 42, 0.2);
}

.next-step:disabled, #ffp-submit:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Secondary Button (Back) */
.prev-step {
    background: #f1f5f9;
    color: #475569;
    flex: 1;
}

.prev-step:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    #ffp-form-container {
        padding: 5px;
        margin: 1px;
        border-radius: 12px;
    }
    .ffp-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    .ffp-card-content img {
        height: 120px;
    }
}

.ffp-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.ffp-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffp-checkbox-item:hover {
    border-color: #cbd5e1;
}

.ffp-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.ffp-checkbox-item span {
    font-size: 16px;
    font-weight: 500;
    color: #334155;
}

/* Textarea Styling */
.ffp-step textarea {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    color: #334155;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 10px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.ffp-step textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Radio List / Single Checkbox Select */
.ffp-radio-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.ffp-radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ffp-radio-item:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.ffp-radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.ffp-radio-item input[type="radio"]:checked + span {
    font-weight: 600;
    color: #1e293b;
}

.ffp-radio-item input[type="radio"]:checked {
    accent-color: #3b82f6;
}

.ffp-radio-item span {
    font-size: 16px;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
}

/* Tooltip / Helper Text */
.ffp-tooltip {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    margin-bottom: 20px;
    padding-left: 2px;
    line-height: 1.5;
    font-style: italic;
}

/* Already Submitted Message */
.ffp-already-submitted {
    animation: fadeInSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ffp-form-wrapper {
    animation: fadeInSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}