/* assets/css/form-wizard.css */

.wizard-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    color: #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.wizard-header {
    margin-bottom: 30px;
    text-align: center;
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    z-index: 1;
}

.wizard-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 4px;
    background: var(--primary, #D72638);
    z-index: 2;
    transition: width 0.3s ease;
    width: 0%;
}

.wizard-step-indicator {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0b1320;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
}

.wizard-step-indicator.active {
    border-color: var(--primary, #D72638);
    background: var(--primary, #D72638);
    color: #ffffff;
}

.wizard-step-indicator.completed {
    background: var(--primary, #D72638);
    border-color: var(--primary, #D72638);
    color: #ffffff;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

.form-group {
    margin-bottom: 20px;
}

.form-group-flex {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-flex-1 {
    flex: 1;
}

@media (max-width: 768px) {
    .form-group-flex {
        flex-direction: column;
        gap: 20px;
    }
}

.form-group label,
.form-flex-1 label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.form-group input, 
.form-group select, 
.form-group textarea,
.form-flex-1 input,
.form-flex-1 select,
.form-flex-1 textarea,
.form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus,
.form-flex-1 input:focus,
.form-flex-1 select:focus,
.form-flex-1 textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary, #D72638);
    background: rgba(255,255,255,0.15);
}

.form-group select option,
.form-flex-1 select option,
.form-control option,
select option {
    background: #ffffff !important;
    color: #1a202c !important;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-wizard {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-wizard-prev {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
}

.btn-wizard-prev:hover {
    background: rgba(255,255,255,0.1);
}

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

.btn-wizard-next, .btn-wizard-submit {
    position: relative;
    background: var(--primary, #D72638) !important;
    color: #ffffff !important;
    overflow: hidden;
    z-index: 1;
    border: none !important;
    box-shadow: 0 4px 15px rgba(215, 38, 56, 0.3);
}

.btn-wizard-next::before, .btn-wizard-submit::before {
    content: '';
    position: absolute;
    top: -100%; left: -100%; width: 300%; height: 300%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%, transparent 100%);
    animation: rotate-border 8s linear infinite;
    z-index: -2;
}

.btn-wizard-next::after, .btn-wizard-submit::after {
    content: '';
    position: absolute;
    inset: 1.5px;
    background: linear-gradient(135deg, #D72638 0%, #B01B2A 100%) !important;
    border-radius: 8px; /* matching the btn-wizard border radius */
    z-index: -1;
    transition: all 0.3s;
}

.btn-wizard-next:hover, .btn-wizard-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(215, 38, 56, 0.5) !important;
}

.btn-wizard-next:hover::before, .btn-wizard-submit:hover::before {
    animation-duration: 4s;
}

.btn-wizard-next:hover::after, .btn-wizard-submit:hover::after {
    background: linear-gradient(135deg, #E63946 0%, #D72638 100%) !important;
}

.summary-box {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary, #D72638);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(255,255,255,0.2);
}

.legal-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.legal-checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

@media (max-width: 480px) {
    .wizard-footer { flex-direction: column; gap: 15px; }
    .btn-wizard { width: 100%; text-align: center; }
}

/* Wizard Validation Feedback */
.wizard-input-error,
input.wizard-input-error,
select.wizard-input-error,
textarea.wizard-input-error {
    border-color: #d72638 !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(215, 38, 56, 0.18) !important;
}

.wizard-field-error {
    color: #d72638 !important;
    font-size: 0.82rem !important;
    margin-top: 6px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    animation: fadeInError 0.25s ease !important;
}

.wizard-step-error-banner {
    background: #fff5f5 !important;
    border: 1px solid #fecaca !important;
    border-left: 4px solid #d72638 !important;
    color: #b91c1c !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    margin: 15px 0 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    box-shadow: 0 4px 12px rgba(215, 38, 56, 0.08) !important;
    animation: fadeInError 0.3s ease !important;
}

@keyframes fadeInError {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
