/* Deploy页面专用样式 */

/* TOKEN输入区域 */
.token-container {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.token-input-group {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.token-field {
    flex: 1;
}

.token-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

/* 输入框容器 */
.input-with-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.token-input {
    flex: 1;
    padding: 14px 50px 14px 18px; /* 右侧留出空间给眼睛按钮 */
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #f8f9fa;
    min-width: 0; /* 允许输入框收缩 */
}

.token-input:focus {
    outline: none;
    border-color: #17a2b8;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
    background: #fff;
}

.token-input::placeholder {
    color: #adb5bd;
}

/* 密码切换按钮 - 保持在输入框内部 */
.toggle-password-btn {
    position: absolute;
    right: 84px; /* 调整位置，为保存按钮留出空间 */
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    z-index: 2;
}

.toggle-password-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.eye-icon {
    font-size: 16px;
    transition: all 0.3s ease;
    user-select: none;
}

.toggle-password-btn.hidden .eye-icon {
    opacity: 0.5;
    text-decoration: line-through;
}

/* 保存按钮样式 - 独立在外部 */
.save-token-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 60px;
    height: 50px; /* 与输入框高度一致 */
    flex-shrink: 0; /* 防止按钮被压缩 */
}

.save-token-btn:hover {
    background: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.save-token-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(23, 162, 184, 0.3);
}

.save-token-btn.saved {
    background: #28a745;
    animation: saveSuccess 0.3s ease;
}

@keyframes saveSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 帮助按钮 */
.help-btn {
    width: 20px;
    height: 20px;
    border: 2px solid #6c757d;
    border-radius: 50%;
    background: transparent;
    color: #6c757d;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.help-btn:hover {
    background: #6c757d;
    color: #fff;
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .token-input-group {
        flex-direction: column;
        gap: 20px;
    }
    
    .input-with-toggle {
        position: relative;
        display: block; /* 改为块级布局 */
    }
    
    .token-input {
        width: 100%;
        padding: 12px 45px 12px 16px;
        font-size: 14px;
        margin-bottom: 10px; /* 与保存按钮的间距 */
    }
    
    /* Mobile端小眼睛按钮保持在输入框右侧 */
    .toggle-password-btn {
        position: absolute;
        right: 40px;
        margin-right: 10px;
        top: 12px; /* 调整到输入框内部 */
        transform: none;
        width: 26px;
        height: 26px;
    }
    
    .eye-icon {
        font-size: 14px;
    }
    
    /* Mobile端保存按钮独立一行 */
    .save-token-btn {
        width: 5%;
        height: 44px;
        font-size: 15px;
        margin-top: 0;
    }
    
    .token-container {
        padding: 20px 15px;
        margin: 0 10px 30px;
    }
    
    .token-label {
        font-size: 14px;
    }
    
    .help-btn {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .token-container {
        margin: 0 5px 20px;
        padding: 15px 10px;
    }
    
    .token-input-group {
        gap: 15px;
    }
    
    /* 修改输入框容器为flex布局，让输入框和保存按钮在同一排 */
    .input-with-toggle {
        display: flex;
        align-items: stretch; /* 改为stretch，让子元素高度一致 */
        gap: 8px;
    }
    
    .token-input {
        flex: 1;
        padding: 10px 60px 10px 14px; /* 调整右侧padding为眼睛按钮留空间 */
        font-size: 13px;
        min-width: 0; /* 允许输入框收缩 */
        height: 40px; /* 明确设置高度与保存按钮一致 */
        box-sizing: border-box; /* 确保padding包含在高度内 */
    }
    
    .toggle-password-btn {
        position: absolute;
        right: 68px; /* 调整位置，为保存按钮留出空间 */
        top: 8px; /* 直接设置距离顶部的距离，基于输入框的padding */
        width: 24px;
        height: 24px;
        z-index: 2; /* 确保按钮在最上层 */
    }
    
    .eye-icon {
        font-size: 20px;
    }
    
    /* 保存按钮放在输入框右侧 */
    .save-token-btn {
        width: auto;
        min-width: 50px;
        height: 40px;
        font-size: 14px;
        padding: 8px 12px;
        flex-shrink: 0; /* 防止按钮被压缩 */
        align-self: stretch; /* 确保按钮拉伸到容器高度 */
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 表格内状态列的特殊样式 */
.batch-table td:nth-child(9) {
    text-align: center;
    vertical-align: middle;
    padding: 8px;
}

/* 确保"是否上线"列有足够宽度 */
.batch-table th:nth-child(9),
.batch-table td:nth-child(9) {
    min-width: 80px;
    width: 80px;
}