/* ==========================================================================
   MAGNUSTIC UNIFIED CONSULTATION & CONTACT FORM
   Clean, robust, dark-themed form component with Services & Products selector
   ========================================================================== */

.mag-form-card {
    background: #0c0d14 !important;
    border: 1.5px solid rgba(252, 199, 5, 0.24) !important;
    border-radius: 22px !important;
    padding: 2.5rem 2.25rem !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55) !important;
    box-sizing: border-box !important;
    color: #ffffff !important;
    position: relative !important;
    text-align: left !important;
}

.mag-form-head {
    margin-bottom: 1.6rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mag-form-title {
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 0 0.4rem !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
}

.mag-form-subtitle {
    font-size: 0.92rem !important;
    color: rgba(255, 255, 255, 0.55) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* Error banner */
.mag-form-error {
    background: rgba(239, 68, 68, 0.14) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    border-radius: 10px !important;
    padding: 0.85rem 1.1rem !important;
    margin-bottom: 1.3rem !important;
    color: #fca5a5 !important;
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
}

/* Success Card */
.mag-success-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}
.mag-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(252, 199, 5, 0.15);
    border: 2px solid #fcc705;
    color: #fcc705;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 auto 1.25rem;
}
.mag-success-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.5rem;
}
.mag-success-msg {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.98rem;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 1.5rem;
}
.mag-success-timeline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    text-align: left;
    max-width: 520px;
    margin: 0 auto 1.75rem;
}
.mag-timeline-item {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}
.mag-timeline-item:last-child {
    margin-bottom: 0;
}
.mag-timeline-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(252, 199, 5, 0.18);
    color: #fcc705;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Section Header (01 / 02) */
.mag-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.4rem 0 0.9rem;
}
.mag-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(252, 199, 5, 0.15);
    color: #fcc705;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}
.mag-section-heading {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #fcc705;
    margin: 0;
}
.mag-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.09);
}

/* Choice Category Groups */
.mag-choice-group {
    margin-bottom: 1.15rem;
}
.mag-group-label-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
    padding-left: 2px;
}
.mag-group-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.18rem 0.6rem;
    border-radius: 6px;
}
.mag-group-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.48);
}

/* Tiles Grid */
.mag-tiles-row {
    display: grid;
    gap: 0.65rem;
}
.mag-tiles-3 {
    grid-template-columns: repeat(3, 1fr);
}
.mag-tiles-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Individual Tile */
.mag-tile {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.95rem 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
    margin: 0;
}
.mag-tile input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}
.mag-tile:hover {
    background: rgba(252, 199, 5, 0.06);
    border-color: rgba(252, 199, 5, 0.4);
    transform: translateY(-2px);
}
.mag-tile.active,
.mag-tile:has(input:checked) {
    background: rgba(252, 199, 5, 0.12) !important;
    border-color: #fcc705 !important;
    box-shadow: 0 0 0 1px rgba(252, 199, 5, 0.25), 0 8px 22px rgba(252, 199, 5, 0.15) !important;
}
.mag-tile-tick {
    position: absolute;
    top: 6px;
    right: 7px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fcc705;
    color: #000000;
    font-size: 9px;
    font-weight: 900;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.mag-tile.active .mag-tile-tick,
.mag-tile:has(input:checked) .mag-tile-tick {
    display: flex;
}
.mag-tile-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}
.mag-tile-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 0.15rem;
}
.mag-tile.active .mag-tile-name,
.mag-tile:has(input:checked) .mag-tile-name {
    color: #fcc705;
}
.mag-tile-desc {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.2;
}
.mag-tile.active .mag-tile-desc,
.mag-tile:has(input:checked) .mag-tile-desc {
    color: rgba(252, 199, 5, 0.8);
}

/* Form Fields */
.mag-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.95rem;
    margin-bottom: 1.35rem;
}
.mag-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: left;
}
.mag-field-span2 {
    grid-column: 1 / -1;
}
.mag-field-label {
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: rgba(255, 255, 255, 0.7) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    margin: 0 !important;
}
.mag-req-star {
    color: #fcc705 !important;
    font-weight: 900 !important;
}
.mag-opt-text {
    font-size: 0.7rem !important;
    font-weight: 400 !important;
    text-transform: none !important;
    color: rgba(255, 255, 255, 0.35) !important;
}

/* Bulletproof Inputs & Textareas */
.mag-field-group input[type="text"],
.mag-field-group input[type="email"],
.mag-field-group textarea {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0.85rem 1rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    font-size: 0.94rem !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
.mag-field-group input::placeholder,
.mag-field-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}
.mag-field-group input:focus,
.mag-field-group textarea:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: #fcc705 !important;
    box-shadow: 0 0 0 3px rgba(252, 199, 5, 0.2) !important;
}
.mag-field-group textarea {
    min-height: 115px !important;
    resize: vertical !important;
}

/* Webkit autofill fix */
.mag-field-group input:-webkit-autofill,
.mag-field-group input:-webkit-autofill:hover, 
.mag-field-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #11121d inset !important;
    box-shadow: 0 0 0px 1000px #11121d inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Submit Button */
.mag-btn-submit {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.65rem !important;
    width: 100% !important;
    padding: 1.05rem 2rem !important;
    background: linear-gradient(135deg, #fcc705 0%, #e0ad00 100%) !important;
    color: #000000 !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(252, 199, 5, 0.35) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    margin: 0 !important;
}
.mag-btn-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 32px rgba(252, 199, 5, 0.5) !important;
    background: linear-gradient(135deg, #ffd83b 0%, #fcc705 100%) !important;
}
.mag-btn-submit svg {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.mag-btn-submit:hover svg {
    transform: translateX(3px);
}

/* Trust footer note */
.mag-footer-note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    line-height: 1.4;
}
.mag-footer-note svg {
    flex-shrink: 0;
}
.mag-footer-note strong {
    color: #fcc705;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .mag-form-card {
        padding: 1.6rem 1.25rem !important;
    }
    .mag-tiles-3 {
        grid-template-columns: 1fr;
    }
    .mag-tiles-2 {
        grid-template-columns: 1fr;
    }
    .mag-fields-grid {
        grid-template-columns: 1fr;
    }
    .mag-group-label-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
