/* 留言表单独立样式文件 */
/* 提取自index.html和about.html的留言表单相关样式 */

/* ============ 留言表单区域样式 ============ */

/* 留言表单主容器 */
.contact-section {
    font-family: 'Arial', sans-serif;
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)), url('../images/pets-background.png');
    background-size: cover;
    background-position: center;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-container {
    max-width: 1400px;
    width: 100%;
    padding: 0 32px;
    text-align: center;
}

.contact-title {
    font-size: 2.8rem;
    font-weight: bold;
    margin-bottom: 16px;
    color: white;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: white;
}

.contact-form-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 标题区域底部间距 - 确保标题和表单之间有足够空间 */
.margin-bottom-48 {
    margin-bottom: 48px;
}

.contact-form-row {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* 输入框样式 - 增强优先级解决CSS冲突 */
.contact-section .contact-input,
.contact-form-row .contact-input,
input.contact-input {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 25px !important;
    padding: 12px 20px !important;
    color: white !important; /* 强制设置文字颜色为白色 */
    font-size: 16px !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    width: 200px;
    height: auto !important;
    box-sizing: border-box !important;
}

/* 确保textarea与input样式完全一致 - 增强优先级解决CSS冲突 */
.contact-section .contact-textarea,
.contact-form-row .contact-textarea,
textarea.contact-textarea {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 25px !important;
    padding: 12px 20px !important;
    color: white !important; /* 强制设置文字颜色为白色 */
    font-size: 16px !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    resize: none !important; /* 禁止调整大小 */
    height: 48px !important; /* 设置固定高度与input一致 */
    font-family: inherit !important; /* 继承字体 */
    line-height: 1.2 !important; /* 设置行高 */
    width: 250px;
    box-sizing: border-box !important;
}

.contact-input:focus {
    /* 保持原有样式，不改变背景色和边框色 */
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-textarea:focus {
    /* 保持原有样式，不改变背景色和边框色 */
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 输入框占位符样式 - 增强优先级解决CSS冲突 */
.contact-section .contact-input::placeholder,
.contact-form-row .contact-input::placeholder,
input.contact-input::placeholder,
.contact-section .contact-textarea::placeholder,
.contact-form-row .contact-textarea::placeholder,
textarea.contact-textarea::placeholder {
    color: white !important; /* 强制设置占位符文字颜色为白色 */
    opacity: 1 !important;
}

/* 具体输入框尺寸 */
.contact-input-company {
    width: 200px;
}

.contact-input-email {
    width: 200px;
}

.contact-input-message {
    width: 250px;
}

/* 提交按钮样式 - 增强优先级解决CSS冲突 */
.contact-section .contact-submit,
.contact-form-row .contact-submit,
button.contact-submit,
.contact-submit-btn {
    background: #faac4c !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 12px 60px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    margin-left: 80px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(250, 172, 76, 0.3) !important;
    width: auto;
    height: auto !important;
}

.contact-submit:hover,
.contact-submit-btn:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.4);
}

.contact-submit:active,
.contact-submit-btn:active {
    background: #d35400;
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(211, 84, 0, 0.3);
}

.contact-submit:not(:hover),
.contact-submit-btn:not(:hover) {
    background: #faac4c;
    transform: translateY(0);
}

/* ============ 成功提示框样式 ============ */

/* 成功提示框容器样式 */
.success-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 成功提示框内容区域 */
.success-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    color: white;
    transform: scale(0.8);
    animation: successPopIn 0.4s ease forwards;
}

/* 成功提示框标题 */
.success-content h3 {
    font-size: 24px;
    margin: 20px 0 15px;
    font-weight: 600;
    color: white;
}

/* 成功提示框描述文字 */
.success-content p {
    font-size: 16px;
    line-height: 1.6;
    margin: 15px 0 25px;
    color: rgba(255, 255, 255, 0.9);
}

/* 成功图标样式 */
.success-icon {
    font-size: 60px;
    color: #4CAF50;
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* 关闭按钮样式 */
.close-success-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-success-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 弹入动画 */
@keyframes successPopIn {
    0% {
        transform: scale(0.5) translateY(-50px);
        opacity: 0;
    }
    70% {
        transform: scale(1.05) translateY(0);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* 手机端响应式样式 */
@media (max-width: 768px) {
    .contact-section {
        min-height: 600px;
        padding: 60px 0;
    }
    
    .contact-container {
        padding: 0 16px;
    }
    
    .contact-title {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .contact-subtitle {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
    
    .contact-form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .contact-input {
        width: 100% !important;
        max-width: none !important;
        padding: 14px 20px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .contact-textarea {
        width: 100% !important;
        max-width: none !important;
        padding: 14px 20px;
        font-size: 16px; /* 防止iOS缩放 */
        min-height: 120px;
    }
    
    .contact-submit,
    .contact-submit-btn {
        width: 100% !important;
        max-width: 280px;
        padding: 14px 32px;
        font-size: 16px;
        margin: 0 auto;
    }
    
    /* 成功提示框手机端适配 */
    .success-content {
        padding: 30px 20px;
        margin: 20px;
        border-radius: 15px;
    }
    
    .success-icon {
        font-size: 50px;
        width: 70px;
        height: 70px;
    }
    
    .success-content h3 {
        font-size: 20px;
    }
    
    .success-content p {
        font-size: 14px;
    }
    
    .close-success-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .contact-section {
        min-height: 500px;
        padding: 40px 0;
    }
    
    .contact-container {
        padding: 0 12px;
    }
    
    .contact-title {
        font-size: 1.75rem;
    }
    
    .contact-subtitle {
        font-size: 1rem;
    }
    
    .contact-input,
    .contact-textarea {
        width: 100% !important;
        max-width: none !important;
        padding: 12px 18px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .contact-textarea {
        min-height: 100px;
    }
    
    .contact-submit,
    .contact-submit-btn {
        width: 100% !important;
        max-width: 260px;
        padding: 12px 30px;
        font-size: 16px;
        margin: 0 auto;
    }
    
    /* 成功提示框超小屏幕适配 */
    .success-content {
        padding: 25px 15px;
        margin: 15px;
    }
    
    .success-icon {
        font-size: 40px;
        width: 60px;
        height: 60px;
    }
    
    .success-content h3 {
        font-size: 18px;
        margin: 15px 0 10px;
    }
    
    .success-content p {
        font-size: 13px;
        margin: 10px 0 20px;
    }
}
