/* Container */
.flux-form-container { max-width: 700px; margin: 0 auto; font-family: 'Inter', sans-serif; background: #fff; border-radius: 8px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); border: 1px solid #e2e8f0; overflow: hidden; position: relative; }
.flux-save-bar { background: #f8fafc; padding: 10px 20px; font-size: 12px; color: #64748b; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; }
#flux-clear-cache { color: #ef4444; text-decoration: none; }

/* Progress */
.flux-progress-bar { height: 6px; background: #f1f5f9; width: 100%; }
.flux-progress-fill { height: 100%; background: #04c7d9; transition: width 1.5s ease; }

/* Form */
.flux-form { padding: 30px; }
.flux-step { animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* Fields */
.flux-field-wrapper { margin-bottom: 20px; }
.flux-field-wrapper label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 17px; color: #334155; }
.flux-input { background:#f4f4f4!important;width: 100%!important; padding: 12px!important; border: 1px solid #cbd5e1!important; border-radius: 6px!important; font-size: 16px!important; box-sizing: border-box!important; }
.captcha-wrap { background: #f8fafc; padding: 15px; border-radius: 6px; border: 1px dashed #cbd5e1; }

/* Address Grid */
.flux-address-group { display: flex; flex-direction: column; gap: 10px; }
.flux-address-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }
.flux-address-grid > input:nth-child(1) { grid-column: span 1; }

/* Swatches */
.flux-swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.flux-swatch-card { border: 2px solid #e2e8f0; border-radius: 6px; overflow: hidden; cursor: pointer; text-align: center; }
.flux-swatch-card:hover { border-color: #94a3b8; }
.flux-swatch-card:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.flux-swatch-card input { display: none; }
.flux-swatch-card .img { height: 80px; background-size: cover; background-position: center; border-bottom: 1px solid #eee; }
.flux-swatch-card span { display: block; padding: 10px; font-size: 13px; font-weight: 600; }

/* Signature */
.flux-sig-pad { border: 1px solid #000; background: #fff; display: inline-block; position: relative; }
.flux-sig-pad canvas { display: block; cursor: crosshair; }
.flux-clear-sig { position: absolute; bottom: 5px; right: 5px; font-size: 11px; padding: 2px 5px; cursor: pointer; }

/* Nav */
.flux-nav { display: flex; justify-content: space-between; margin-top: 30px; gap: 20px; border-top: 1px solid #f1f5f9; }
.flux-btn { padding: 12px 24px; border-radius: 6px; font-weight: 600; border: none; cursor: pointer; font-size: 15px; }
.flux-prev { background: #fff; border: 1px solid #cbd5e1; color: #64748b; }
.flux-next, .flux-submit { background: #000000;color: #fff;width: 50%;padding: 9px;font-size: 18px;font-weight: 600;margin-left: auto;margin-right: auto;border-radius: 4px; }
.flux-next:hover, .flux-submit:hover { background: #000000;color:#04c7d9; }

/* Modal */
.flux-modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 9999; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.flux-modal-content { background: #fff; padding: 40px; width: 90%; max-width: 500px; border-radius: 8px; text-align: center; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); animation: slideUp 0.3s ease-out; position: relative; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.flux-modal-close { position: absolute; top: 15px; right: 15px; font-size: 24px; cursor: pointer; color: #94a3b8; }
.flux-modal-icon { font-size: 50px; color: #22c55e; margin-bottom: 20px; }
.flux-modal-btn { margin-top: 20px; padding: 10px 20px; background: #0f172a; color: #fff; border: none; border-radius: 4px; cursor: pointer; }

@media (max-width: 600px) { .flux-address-grid { grid-template-columns: 1fr; } }

/* --- MODAL / POPUP STYLES --- */
.flux-modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark dimming */
    z-index: 999999; /* Ensure it is on top of header/footer */
    
    /* Centering Magic */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px); /* Modern blur effect */
}

.flux-modal-content {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: fluxPopIn 0.3s ease-out;
}

.flux-modal-icon {
    font-size: 50px;
    color: #48bb78; /* Green Checkmark */
    margin-bottom: 15px;
    line-height: 1;
}

#flux-modal-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
}

#flux-modal-text {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.5;
}

.flux-modal-close-btn {
    background: #04c7d9;
    color: #000000;
    border: none;
    padding: 10px 25px;
    border-radius: 1px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 1.5s;
	width: 100%;
}

.flux-modal-close-btn:hover {
    background: #000000;
	color:#ffffff;
}

/* Close X in top right */
.flux-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #cbd5e0;
    cursor: pointer;
}
.flux-modal-close:hover { color: #718096; }

@keyframes fluxPopIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* FORCE SIDE-BY-SIDE LAYOUT */
.flux-step {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between columns */
    width: 100%;
}

.flux-field-wrapper {
    box-sizing: border-box;
    /* This ensures padding doesn't break the 50% width */
}

/* Mobile Responsive: Stack everything on small screens */
@media only screen and (max-width: 600px) {
    .flux-field-wrapper {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}