/*
Theme Name: sunymotor
Theme URI: https://sunymotor.com
Author: Aaron
Author URI: https://sunymotor.com
Description: this is a website for sunymotor
Version: 1.0
*/
/* 调整Contact Form 7输入框高度 */
/* Contact Form 7 样式修复 */

/* 修复输入框高度 */
.wpcf7-form .form-control {
    height: auto !important;
    padding: 0.75rem 1rem !important;
    line-height: 1.5 !important;
    border: 2px solid var(--motor-gray-200) !important;
}

/* 修复文本区域高度 - 减少高度 */
.wpcf7-form textarea.form-control {
    min-height: 120px !important; /* 减少高度 */
    height: 120px !important; /* 固定高度 */
}

/* 修复按钮样式 */
.wpcf7-form .btn-motor-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    height: auto !important;
}

/* 修复按钮内部图标和文字对齐 */
.wpcf7-form .btn-motor-primary i,
.wpcf7-form .btn-motor-primary span {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
}

/* 修复表单组样式 */
.wpcf7-form .form-group {
    margin-bottom: 1rem !important;
}

/* 修复标签样式 - 减少与输入框的距离 */
.wpcf7-form .form-label {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.25rem !important; /* 减少底部边距 */
}

/* 修复 form-note 与提交按钮的距离 */
.wpcf7-form .form-note {
    margin-top: 0.5rem !important; /* 减少顶部边距 */
}

/* Toast 通知样式 */
.motor-toast-container {
    position: fixed;
    top: 80px; /* 增加顶部距离 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 90%;
}

.motor-toast {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    margin-bottom: 10px;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    position: relative;
}

.motor-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.motor-toast.hide {
    transform: translateY(-20px);
    opacity: 0;
}

.motor-toast-icon {
    flex-shrink: 0;
    margin-right: 12px;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.motor-toast-mail_sent .motor-toast-icon {
    color: #10b981; /* 成功绿色 */
}

.motor-toast-mail_failed .motor-toast-icon,
.motor-toast-validation_failed .motor-toast-icon,
.motor-toast-invalid .motor-toast-icon,
.motor-toast-spam .motor-toast-icon,
.motor-toast-unknown .motor-toast-icon {
    color: #ef4444; /* 错误红色 */
}

.motor-toast-content {
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    display: flex;
    align-items: center;
}

.motor-toast-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    height: 24px;
    width: 24px;
}

.motor-toast-close:hover {
    color: #6b7280;
}

/* 隐藏原始 CF7 响应消息 */
.wpcf7-response-output {
    display: none !important;
}

/* 修复验证错误消息样式 */
.wpcf7-not-valid-tip {
    font-size: 0.875rem !important;
    margin-top: 0.25rem !important;
    color: #dc3545 !important;
}

/* 修复表单提交加载动画位置 */
.wpcf7-spinner {
    margin-left: 1rem !important;
    position: relative !important;
}