/* 保存状态指示器 */
.btn-save {
    font-size: 20px;
    cursor: pointer;
    color: #1abc9c;
    margin-right: 8px;
    display: inline-block;
}

.btn-delete {
    font-size: 20px;
    cursor: pointer;
    display: inline-block;
    color: #e74c3c;
}

/* 自定义数字键盘样式 */
.custom-keyboard {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f0f0f0;
    padding: 5px;
    border-top: 1px solid #ddd;
    z-index: 99999;
}

.custom-keyboard.show {
    display: block;
}

.keyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 6px;
    margin-bottom: 5px;
}

.keyboard-header span {
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

.keyboard-header button {
    background: #1abc9c;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
}

.keyboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 300px;
    margin: 0 auto;
}

.keyboard-key {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 5px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.1s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
}

.keyboard-key:active {
    background: #e0e0e0;
    transform: scale(0.98);
}

.keyboard-key.special {
    background: #e0e0e0;
    font-size: 20px;
}

.keyboard-key.special:active {
    background: #d0d0e0;
}

/* 自定义输入框样式，避免系统键盘弹出 */
.custom-input {
    position: relative;
}

.custom-input input {
    cursor: pointer;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.custom-input input:focus {
    outline: none;
    border-color: #1abc9c;
    box-shadow: 0 0 0 2px rgba(26, 188, 156, 0.2);
}

/* 模拟光标效果的容器 */
.custom-input .cursor-wrapper {
    position: relative;
    display: block;
}

/* 跳动的光标 */
.custom-input .fake-cursor {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 1.4em;
    background-color: #666;
    animation: blink 1s infinite;
    display: none;
    pointer-events: none;
    z-index: 100;
}

.custom-input .fake-cursor.show {
    display: block;
}

@keyframes blink {
    0%, 50% {
        opacity: 0.8;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

/* 立方价格计算区域 */
.cubic-price-section {
    background: #f8f9fa;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 8px;
    margin-bottom: 8px;
    border: 1px solid #e5e5e5;
}

.cubic-info {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.cubic-price-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cubic-price-label {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

.cubic-price-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    background: white;
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.cubic-price-currency {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

#cubic-price-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    background: transparent;
}

#cubic-price-input::placeholder {
    color: #999;
    font-weight: 400;
}

.cubic-price-unit {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

/* =============== 保存状态指示器样式 =============== */
.save-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e8ecef;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.save-status-icon {
    font-size: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.save-status-text {
    color: #27ae60;
    font-weight: 500;
}

.save-status.saving .save-status-text {
    color: #3498db;
}

.save-status.saving .save-status-icon {
    animation: spin 1s linear infinite;
}

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

.save-status-time {
    color: #95a5a6;
    font-size: 12px;
    margin-left: auto;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .save-status {
        padding: 6px 12px;
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .save-status-icon {
        font-size: 14px;
    }
    
    .save-status-time {
        font-size: 11px;
    }
}

/* 移动端数字键盘适配 */
@media (max-width: 768px) {
    .custom-keyboard {
        padding: 5px;
    }
    
    .keyboard-grid {
        max-width: 300px;
        gap: 5px;
    }
    
    .keyboard-key {
        padding: 10px 5px;
        font-size: 17px;
        min-height: 40px;
    }
    
    .keyboard-header {
        padding: 3px 5px;
    }
    
    .keyboard-header button {
        padding: 5px 12px;
        font-size: 12px;
    }
}

/* ================== 智能推荐引擎样式 ================== */
.smart-tips-container {
    margin-top: 8px;
    width: 100%;
}

.smart-tip {
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.smart-tip-info {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 3px solid #2196f3;
}

.smart-tip-warning {
    background: #fff3e0;
    color: #e65100;
    border-left: 3px solid #ff9800;
}

.smart-tip-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #4caf50;
}

/* 价格验证样式 */
.price-valid {
    border-color: #4caf50 !important;
    background-color: #e8f5e9 !important;
}

.price-warning {
    border-color: #ff9800 !important;
    background-color: #fff3e0 !important;
}

.price-error {
    border-color: #f44336 !important;
    background-color: #ffebee !important;
}

.price-validation-tip {
    margin-top: 5px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    animation: fadeIn 0.3s ease;
}

.validation-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.validation-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ff9800;
}

.validation-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

/* 智能按钮样式 */
.smart-actions-container {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.smart-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.smart-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.smart-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.smart-btn-secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.smart-btn-secondary:hover {
    background: #e8eaed;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .smart-tip {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .smart-actions-container {
        flex-direction: column;
    }
    
    .smart-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ================== 登录提示弹窗样式 ================== */
.login-prompt {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-prompt.show {
    display: flex;
}

.login-prompt-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-prompt-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.login-prompt-content h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.login-prompt-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.login-prompt-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.login-prompt-btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-prompt-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.login-prompt-btn-secondary {
    background: #f0f0f0;
    color: #555;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-prompt-btn-secondary:hover {
    background: #e0e0e0;
}

/* 登录提示弹窗移动端适配 */
@media (max-width: 768px) {
    .login-prompt-content {
        padding: 24px 20px;
        max-width: 90%;
    }
    
    .login-prompt-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }
    
    .login-prompt-content h3 {
        font-size: 16px;
    }
    
    .login-prompt-content p {
        font-size: 13px;
    }
    
    .login-prompt-buttons {
        flex-direction: column;
    }
    
    .login-prompt-btn-primary,
    .login-prompt-btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }
}
