/* ==== MAGOODS CONTACT FORM ==== */
/* Wrapper */
.mg-contact-wrapper {
    animation: pageSlideIn 0.6s var(--transition) forwards;
}

@keyframes pageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.mg-contact-header {
    text-align: center;
    margin-bottom: 40px;
    animation: headerFloatIn 0.8s var(--transition) forwards;
}

@keyframes headerFloatIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mg-header-icon {
    font-size: 48px;
    color: #00a8e8;
    text-shadow: 0 0 20px rgba(0, 168, 232, 0.5);
    margin-bottom: 16px;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.mg-contact-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #007ea7, #00a8e8, #00c9ff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.mg-contact-subtitle {
    font-size: 15px;
    color: var(--darkGray);
    margin: 0;
}

/* Contact Card */
.mg-contact-card {
    background: rgba(0, 23, 31, 0.75);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(0, 168, 232, 0.2);
    border-radius: 24px;
    padding: 40px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.37),
        0 0 80px rgba(0, 168, 232, 0.2);
    animation: cardSlideIn 0.8s var(--transition) 0.2s forwards;
    opacity: 0;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alerts */
.mg-alert {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    animation: alertSlideIn 0.4s var(--transition) forwards;
    border: 1px solid;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mg-alert-success {
    background: rgba(0, 210, 106, 0.1);
    border-color: rgba(0, 210, 106, 0.3);
}

.mg-alert-error {
    background: rgba(255, 79, 79, 0.1);
    border-color: rgba(255, 79, 79, 0.3);
}

.mg-alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.mg-alert-success .mg-alert-icon {
    color: #00d26a;
}

.mg-alert-error .mg-alert-icon {
    color: #ff4f4f;
}

.mg-alert-content {
    flex: 1;
    font-size: 14px;
}

.mg-alert-content strong {
    display: block;
    margin-bottom: 4px;
}

.mg-alert-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
}

.mg-alert-content ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.75);
}

.mg-alert-content li {
    margin-bottom: 4px;
}

.mg-alert-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mg-alert-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}

/* Form Section */
.mg-form-section {
    margin-bottom: 32px;
}

.mg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Form Group */
.mg-form-group {
    margin-bottom: 24px;
}

.mg-form-label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mg-form-label i {
    color: #00a8e8;
    font-size: 16px;
}

/* Input Wrapper */
.mg-input-wrapper {
    position: relative;
}

.mg-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 168, 232, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    transition: all 0.3s var(--transition);
}

.mg-input:focus {
    outline: none;
    border-color: #00a8e8;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.15);
    transform: translateY(-2px);
}

.mg-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.mg-input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00a8e8, #00c9ff);
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.3s var(--transition);
    border-radius: 0 0 12px 12px;
}

.mg-input:focus~.mg-input-border {
    opacity: 1;
    transform: scaleX(1);
}

/* Textarea */
.mg-textarea-wrapper {
    position: relative;
}

.mg-textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 168, 232, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s var(--transition);
    max-height: 300px;
    min-height: 140px;
}

.mg-textarea:focus {
    outline: none;
    border-color: #00a8e8;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.15);
}

.mg-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.mg-textarea-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00a8e8, #00c9ff);
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.3s var(--transition);
    border-radius: 0 0 12px 12px;
}

.mg-textarea:focus~.mg-textarea-border {
    opacity: 1;
    transform: scaleX(1);
}

/* Character Counter */
.mg-char-count {
    position: absolute;
    bottom: 10px;
    right: 16px;
    font-size: 11px;
    color: var(--darkGray);
    font-weight: 600;
    background: rgba(0, 23, 31, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Captcha Wrapper */
.mg-captcha-wrapper {
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(0, 52, 89, 0.2);
    border: 1px solid rgba(0, 168, 232, 0.15);
    border-radius: 12px;
}

/* Form Actions */
.mg-form-actions {
    margin-bottom: 24px;
}

.mg-btn-submit {
    width: 100%;
    padding: 14px 0;
    background: linear-gradient(135deg, #007ea7, #00a8e8);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s var(--transition);
    box-shadow: 0 4px 15px rgba(0, 168, 232, 0.3);
}

.mg-btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 168, 232, 0.5);
}

.mg-btn-submit:active {
    transform: translateY(-1px);
}

.mg-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Info */
.mg-form-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--darkGray);
}

.mg-form-info i {
    color: #00a8e8;
}

/* Success Container */
.mg-success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    animation: successBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes successBounceIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.mg-success-icon {
    font-size: 60px;
    color: #00d26a;
    text-shadow: 0 0 20px rgba(0, 210, 106, 0.5);
    margin-bottom: 20px;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.mg-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
}

.mg-success-text {
    font-size: 15px;
    color: var(--darkGray);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.mg-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(0, 168, 232, 0.15);
    border: 1.5px solid rgba(0, 168, 232, 0.3);
    border-radius: 10px;
    color: #00a8e8;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mg-btn-back:hover {
    background: rgba(0, 168, 232, 0.25);
    border-color: #00a8e8;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .mg-contact-card {
        padding: 30px 20px;
    }

    .mg-contact-title {
        font-size: 24px;
    }

    .mg-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

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

@media (max-width: 480px) {
    .mg-contact-header {
        margin-bottom: 30px;
    }

    .mg-header-icon {
        font-size: 40px;
    }

    .mg-contact-title {
        font-size: 20px;
    }

    .mg-contact-card {
        padding: 24px 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .mg-contact-wrapper,
    .mg-contact-card,
    .mg-btn-submit {
        animation: none;
        transition: none;
    }
}

*:focus-visible {
    outline: 2px solid #00a8e8;
    outline-offset: 2px;
}

@keyframes alertSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}