/**
 * Contact Form Styles
 * San-Q Movement Rehab Inc.
 */

/* 模态框遮罩 */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal.active {
    opacity: 1;
}

.contact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* 模态框内容 */
.contact-modal-content {
    position: relative;
    background: white;
    border-radius: 25px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.contact-modal.active .contact-modal-content {
    transform: scale(1);
}

/* 关闭按钮 */
.contact-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(30, 73, 56, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    color: var(--deep-emerald);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.contact-modal-close:hover {
    background: var(--deep-emerald);
    color: white;
    transform: rotate(90deg);
}

/* 头部 */
.contact-header {
    background: linear-gradient(135deg, var(--ivory) 0%, var(--bg-texture) 100%);
    padding: 50px 40px 35px;
    text-align: center;
    border-radius: 25px 25px 0 0;
    position: relative;
}

.contact-icon {
    font-size: 50px;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.contact-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--deep-emerald);
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.contact-header p {
    color: var(--antique-rose);
    font-size: 15px;
    margin: 0;
}

/* 表单样式 */
.contact-form {
    padding: 40px 40px 30px;
}

.contact-form-group {
    margin-bottom: 25px;
}

.contact-form-group label {
    display: block;
    font-weight: 600;
    color: var(--deep-emerald);
    margin-bottom: 8px;
    font-size: 14px;
}

.contact-form-group .required {
    color: #e74c3c;
    margin-left: 3px;
}

.contact-form-group input,
.contact-form-group select,
.contact-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--light-gold);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: white;
}

.contact-form-group input:focus,
.contact-form-group select:focus,
.contact-form-group textarea:focus {
    outline: none;
    border-color: var(--deep-emerald);
    box-shadow: 0 0 0 3px rgba(30, 73, 56, 0.1);
}

.contact-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.character-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 表单行布局 */
.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* 提交按钮 */
.contact-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--deep-emerald) 0%, #2d6e54 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(30, 73, 56, 0.3);
}

.contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 73, 56, 0.4);
}

.contact-submit-btn:active {
    transform: translateY(0);
}

.contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 成功消息 */
.contact-success-message {
    padding: 50px 40px;
    text-align: center;
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 25px;
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.contact-success-message h3 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--deep-emerald);
    margin: 0 0 15px 0;
}

.contact-success-message p {
    color: var(--charcoal);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.success-close-btn {
    padding: 14px 40px;
    background: var(--deep-emerald);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.success-close-btn:hover {
    background: #1a4232;
    transform: translateY(-2px);
}

/* 底部信息 */
.contact-footer {
    background: var(--bg-texture);
    padding: 25px 40px;
    border-radius: 0 0 25px 25px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--charcoal);
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* 悬浮联系按钮 */
.floating-contact-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1E4938 0%, #2d6e54 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(30, 73, 56, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    z-index: 9999;
}

.floating-contact-btn:hover {
    box-shadow: 0 12px 35px rgba(30, 73, 56, 0.5);
}

.floating-contact-btn .btn-icon {
    font-size: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-modal {
        padding: 10px;
    }

    .contact-modal-content {
        max-height: 95vh;
        border-radius: 20px;
    }

    .contact-header {
        padding: 40px 30px 30px;
        border-radius: 20px 20px 0 0;
    }

    .contact-header h2 {
        font-size: 26px;
    }

    .contact-form {
        padding: 30px 25px;
    }

    .contact-form-row {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .contact-footer {
        padding: 20px 25px;
        border-radius: 0 0 20px 20px;
    }

    .floating-contact-btn {
        bottom: 20px;
        padding: 14px 24px;
        font-size: 15px;
    }

    .floating-contact-btn .btn-text {
        display: none;
    }

    .floating-contact-btn .btn-icon {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .contact-header {
        padding: 35px 25px 25px;
    }

    .contact-header h2 {
        font-size: 24px;
    }

    .contact-icon {
        font-size: 40px;
    }

    .contact-form {
        padding: 25px 20px;
    }

    .contact-footer {
        padding: 20px 20px;
    }

    .contact-info-item {
        font-size: 13px;
    }
}