/* MARSWAYS - Enhanced Contact Form Styles */

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-header-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: var(--shadow-glow); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 77, 77, 0.5); }
}

.form-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Progress Steps */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--primary-gradient);
    border-color: var(--primary);
    color: white;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
    color: var(--primary);
    font-weight: 500;
}

.progress-step.completed .step-number::after {
    content: '✓';
    position: absolute;
}

.progress-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 0.5rem;
    position: relative;
    top: -12px;
    transition: var(--transition);
}

.progress-line.active {
    background: var(--primary-gradient);
}

/* Form Steps */
.multi-step-form {
    position: relative;
}

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

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

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

.step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.step-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.step-header h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    margin: 0;
}

/* Enhanced Form Groups */
.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: var(--primary);
    font-size: 0.85rem;
}

.field-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.char-count {
    text-align: right;
}

/* Enhanced Inputs */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: rgba(255, 77, 77, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

/* Select Styling */
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6,9 12,15 18,9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Priority Selection */
.priority-select {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.priority-option {
    flex: 1;
    min-width: 100px;
}

.priority-option input {
    display: none;
}

.priority-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.priority-card:hover {
    border-color: rgba(255, 77, 77, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.priority-option input:checked + .priority-card {
    border-color: var(--primary);
    background: rgba(255, 77, 77, 0.1);
}

/* Custom Checkbox */
.checkbox-group {
    margin-top: 1rem;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-top: 1px;
}

.checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.custom-checkbox:hover .checkmark {
    border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark {
    background: var(--primary-gradient);
    border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.custom-checkbox a {
    color: var(--primary);
}

.custom-checkbox a:hover {
    text-decoration: underline;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-navigation .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.form-navigation .btn-next,
.form-navigation .btn-submit {
    margin-left: auto;
}

.form-navigation .btn-primary:hover {
    transform: translateX(3px);
}

.form-navigation .btn-secondary:hover {
    transform: translateX(-3px);
}

/* Submit Button Loading State */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success State */
.form-success {
    display: none;
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.form-success.active {
    display: block;
}

.success-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    color: white;
    box-shadow: 0 15px 50px rgba(34, 197, 94, 0.4);
    animation: successBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.success-icon::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid rgba(34, 197, 94, 0.3);
    animation: successRing 1s ease-out 0.3s forwards;
    opacity: 0;
}

.success-icon::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 2px solid rgba(34, 197, 94, 0.15);
    animation: successRing 1s ease-out 0.5s forwards;
    opacity: 0;
}

.success-icon i {
    animation: checkmarkDraw 0.5s ease-out 0.3s both;
}

@keyframes successBounce {
    0% { opacity: 0; transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    70% { transform: scale(0.9) rotate(-5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes successRing {
    0% { transform: scale(0.8); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes checkmarkDraw {
    0% { opacity: 0; transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.form-success h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    animation: fadeSlideUp 0.5s ease-out 0.4s both;
}

.form-success > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 420px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    animation: fadeSlideUp 0.5s ease-out 0.5s both;
}

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

.success-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    animation: fadeSlideUp 0.5s ease-out 0.6s both;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-lg);
    color: #22c55e;
    font-size: 0.95rem;
    transition: var(--transition);
}

.info-item:hover {
    background: rgba(34, 197, 94, 0.15);
    transform: translateY(-2px);
}

.info-item i {
    font-size: 1.1rem;
}

.form-success .btn {
    animation: fadeSlideUp 0.5s ease-out 0.7s both;
}

/* Confetti effect */
.confetti-container {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    overflow: visible;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall 1.5s ease-out forwards;
}

@keyframes confettiFall {
    0% { 
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translateY(150px) rotate(720deg) scale(0);
        opacity: 0;
    }
}

/* Form Disclaimer */
.form-disclaimer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-disclaimer i {
    color: #22c55e;
}

/* Error Toast */
.error-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.error-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.error-toast i {
    font-size: 1.25rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .form-header-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

    .form-header h3 {
        font-size: 1.25rem;
    }

    .form-progress {
        padding: 0.75rem;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .step-label {
        font-size: 0.7rem;
    }

    .progress-line {
        width: 40px;
    }

    .form-navigation {
        flex-direction: column;
    }

    .form-navigation .btn {
        width: 100%;
        justify-content: center;
    }

    .form-navigation .btn-next,
    .form-navigation .btn-submit {
        margin-left: 0;
        order: -1;
    }

    .priority-select {
        flex-direction: column;
    }

    .priority-option {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .progress-line {
        width: 25px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .success-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .form-success h3 {
        font-size: 1.5rem;
    }
}
