/* 通用弹窗样式 */
.swal2-popup {
    width: 480px !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    border-radius: 20px !important;
    background: linear-gradient(145deg, #ffffff, #f5f5f5) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.swal2-popup * {
    box-sizing: border-box;
}

.swal2-popup .swal2-html-container {
    margin: 0 !important;
    padding: 0 25px !important;
    width: 100% !important;
    overflow: visible !important;
}

/* 统一的标题样式 */
.swal2-popup .swal2-title {
    font-size: 1.5rem !important;
    color: #2c3e50 !important;
    margin: 15px 0 25px 0 !important;
    padding: 0 0 0 20px !important;
    font-weight: 600 !important;
    position: relative !important;
    text-align: left !important;
}

.swal2-popup .swal2-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #4CAF50, #45a049);
    border-radius: 2px;
}

.swal2-popup .swal2-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, #4CAF50, transparent);
}

/* 警告和错误状态 */
.swal2-modal-warning .swal2-title::before {
    background: linear-gradient(to bottom, #ffc107, #ff9800);
}

.swal2-modal-warning .swal2-title::after {
    background: linear-gradient(to right, #ffc107, transparent);
}

.swal2-modal-error .swal2-title::before {
    background: linear-gradient(to bottom, #dc3545, #c82333);
}

.swal2-modal-error .swal2-title::after {
    background: linear-gradient(to right, #dc3545, transparent);
}

/* 输入框通用样式 */
.input-wrapper {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1;
}

.input-label {
    position: absolute;
    top: -10px;
    left: 12px;
    background: #fff;
    padding: 0 8px;
    font-size: 12px;
    color: #666;
    z-index: 2;
}

/* 输入框和选择框基础样式 */
.login-input,
.swal2-select {
    height: 45px;
    padding: 0 15px 0 35px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
}

/* 新建文件表单中的输入框保持100%宽度 */
.new-file-form .login-input {
    width: 100%;
}

/* 选择框特殊样式 */
select.login-input,
.swal2-select {
    appearance: none;
    cursor: pointer;
    padding-right: 30px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    min-width: 120px;  /* 设置最小宽度 */
    width: auto;  /* 自适应内容宽度 */
}

/* 确保新建文件对话框中的选择框保持100%宽度 */
.new-file-form select.login-input {
    width: 100%;
}

/* 输入框状态 */
.login-input:hover,
.swal2-select:hover {
    border-color: #bbb;
}

.login-input:focus,
.swal2-select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.input-wrapper:focus-within i,
.input-wrapper:focus-within .input-label {
    color: #4CAF50;
}

/* 按钮样式 */
.login-confirm-button {
    width: 100% !important;
    height: 45px !important;
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    border-radius: 8px !important;
    padding: 8px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
    border: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2) !important;
}

.login-confirm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3) !important;
}

/* 状态栏样式 */
.statusBar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25px;
    background: #1e1e1e;
    border-top: 1px solid #333;
    color: #8c8c8c;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    user-select: none;
    z-index: 1000;
}

.status-left { gap: 15px; }
.status-right { gap: 1px; }

.status-left,
.status-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.statusBar span {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 100%;
    padding: 0 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-right span {
    border-left: 1px solid #333;
}

.status-right span:first-child {
    border-left: none;
}

.statusBar span:hover {
    background-color: #2a2a2a;
    color: #fff;
}

.statusBar span.active {
    background-color: #0e639c;
    color: #fff;
}

/* 文件列表样式 */
.explorer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin: 2px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.item-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.explorer-item:hover .item-actions {
    opacity: 1;
}

.explorer-item.active {
    background-color: #404040;
    border-left: 2px solid #1e90ff;
    padding-left: 11px;
}

/* 响应式调整 */
@media (max-width: 520px) {
    .swal2-popup {
        width: 90% !important;
    }
    
    .new-file-form .input-group {
        grid-template-columns: 1fr;
    }
}

/* 新建文件表单样式 */
.new-file-form {
    padding: 10px 0;
    width: 100%;
    box-sizing: border-box;
}

/* 文件名输入框容器 */
.new-file-form .filename-wrapper {
    margin-bottom: 25px;
    position: relative;
}

.new-file-form .filename-wrapper::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, #e0e0e0 0%, transparent 100%);
}

/* 输入框组布局 */
.new-file-form .input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

/* 新建文件表单中的标签样式 */
.new-file-form .input-label {
    background: linear-gradient(to right, #fff 0%, #fff 70%, transparent 100%);
    padding: 0 12px;
    font-weight: 500;
    color: #555;
    font-size: 0.85rem;
}

/* 新建文件表单中的图标样式 */
.new-file-form .input-wrapper i {
    color: #888;
    font-size: 1rem;
}

/* 新建文件表单中的输入框样式 */
.new-file-form .login-input {
    background: #f8f9fa;
    border-color: #e9ecef;
    transition: all 0.2s ease;
}

.new-file-form .login-input:hover {
    background: #fff;
    border-color: #dee2e6;
}

.new-file-form .login-input:focus {
    background: #fff;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 新建文件表单中的选择框样式 */
.new-file-form select.login-input {
    padding-right: 35px;
    background-position: right 12px center;
}

/* 聚焦状态样式 */
.new-file-form .input-wrapper:focus-within .input-label {
    color: #4CAF50;
    font-weight: 600;
}

.new-file-form .input-wrapper:focus-within i {
    color: #4CAF50;
    transform: translateY(-50%) scale(1.1);
}

/* 按钮布局 */
.new-file-dialog .swal2-actions {
    margin-top: 30px !important;
    padding: 0 20px;
    gap: 10px;
}

.new-file-dialog .swal2-confirm,
.new-file-dialog .swal2-cancel {
    margin: 0 !important;
    min-width: 100px !important;
    height: 40px !important;
}

/* 响应式调整 */
@media (max-width: 520px) {
    .new-file-form .input-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
 