/**
 * 手机号绑定和短信登录弹窗样式
 * v3.32.1 - 添加Toast提示样式
 */

/* Toast提示框样式 */
.phone-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    word-break: break-word;
}

.phone-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.phone-toast-success {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.phone-toast-error {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.phone-toast-info {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.phone-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.phone-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.phone-modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.phone-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.phone-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: color 0.3s;
}

.phone-modal-close:hover {
    color: #333;
}

.phone-modal-body {
    padding: 30px 20px;
}

.phone-input-group {
    margin-bottom: 20px;
    position: relative;
}

.phone-input-group input[type="tel"],
.phone-input-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.phone-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.phone-input-group:has(.phone-send-code) input {
    padding-right: 120px;
}

.phone-send-code {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.phone-send-code:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-50%) translateY(-1px);
}

.phone-send-code:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.phone-hint {
    color: #999;
    font-size: 13px;
    margin: 10px 0 20px;
    text-align: center;
}

.phone-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.phone-submit-btn:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

/* 用户中心绑定手机号按钮样式 */
.bind-phone-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.bind-phone-btn:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

/* 响应式 */
@media (max-width: 480px) {
    .phone-modal {
        width: 95%;
    }

    .phone-modal-body {
        padding: 20px 15px;
    }

    .phone-send-code {
        font-size: 12px;
        padding: 6px 12px;
    }

    .phone-input-group:has(.phone-send-code) input {
        padding-right: 100px;
    }
}
