/* File select checkbox styles */
.file-select-checkbox {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Updated button styles to be consistent */
.action-button {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: all 0.3s;
    margin-left: 10px;
    background-color: #409eff;
}

.action-button i {
    margin-right: 5px;
}

.action-button:hover {
    background-color: #66b1ff;
}

.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(64, 158, 255, 0.2);
}

.action-button.disabled {
    background-color: #c0c4cc;
    cursor: not-allowed;
    opacity: 0.7;
}

#shareSelected, .copyall {
    text-decoration: none;
}

.batch-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.short-url-wrapper,
.toggle-all-wrapper {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#enableShortUrl, 
#toggleAllFiles {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.short-url-label, 
.toggle-all-label {
    margin-left: 5px;
    font-size: 14px;
    color: #606266;
    white-space: nowrap;
}

/* Modal styles */
#batchSharePassphraseModal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

#batchSharePassphraseModal .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
}

#batchSharePassphraseModal h3 {
    margin-top: 0;
}

#batchSharePassphraseModal .input-wrapper {
    margin-bottom: 15px;
}

#batchSharePassphraseModal .modal-actions {
    display: flex;
    justify-content: space-between;
}

/* 优化 file-select-checkbox 在小屏幕下的尺寸 */
@media (max-width: 480px) {
    .file-select-checkbox, #toggleAllFiles, #enableShortUrl {
        width: 14px;
        height: 14px;
    }
    .toggle-all-label, .short-url-label {
        font-size: 12px;
    }
}
/* 优化 batch-actions 在小屏幕下的间距 */
@media (max-width: 480px) {
    .batch-actions {
        gap: 4px;
    }
    .toggle-all-wrapper, .short-url-wrapper {
        margin-right: 4px;
    }
}
/* 优化 modal 在小屏幕下的宽度和圆角 */
@media (max-width: 480px) {
    #batchSharePassphraseModal .modal-content {
        padding: 10px 3vw;
        max-width: 98vw;
        border-radius: 8px;
    }
    #batchSharePassphraseModal input[type="password"],
    #batchSharePassphraseModal input[type="text"] {
        font-size: 13px;
        border-radius: 6px;
        padding: 8px 28px 8px 8px;
    }
    #batchSharePassphraseModal .modal-actions button {
        font-size: 13px;
        padding: 7px 12px;
        border-radius: 6px;
    }
}
/* 优化 action-button 和 copyall 在小屏幕下的尺寸 */
@media (max-width: 480px) {
    .action-button, .copyall {
        font-size: 12px;
        padding: 4px 8px;
        border-radius: 8px;
        min-width: 48px;
        margin-left: 4px;
    }
}
/* 优化 lang-selector 在小屏幕下的位置 */
@media (max-width: 480px) {
    .lang-selector {
        right: 6px;
    }
    #langSelect {
        font-size: 12px;
        padding: 3px 6px;
        border-radius: 6px;
    }
}
/* 优化 passphrase-bar 在小屏幕下的布局 */
@media (max-width: 480px) {
    .passphrase-bar {
        padding: 7px 6px 3px 6px;
        min-height: 28px;
        border-radius: 8px 8px 0 0;
    }
    .passphrase-input-wrapper {
        gap: 4px;
    }
    #passphraseInput {
        font-size: 13px;
        border-radius: 8px;
        padding: 6px 10px;
    }
    .password-toggle {
        padding: 4px 7px;
        font-size: 13px;
        border-radius: 6px;
    }
}
/* 优化 footer 在小屏幕下的显示 */
@media (max-width: 480px) {
    #footer {
        font-size: 12px;
        padding: 8px 4px; 
        border-radius: 8px 8px 0 0;
    }
    #footer .info {
        margin-bottom: 4px; 
    }
    #footer a {
        margin: 0 4px;
    }
}
/* 优化 toast 在小屏幕下的圆角和字体 */
@media (max-width: 480px) {
    .toast {
        border-radius: 8px;
        font-size: 13px;
        padding: 10px 12px;
    }
}
/* 优化 select-group 在小屏幕下的间距 */
@media (max-width: 480px) {
    .select-group {
        gap: 5px;
    }
    .select-group label {
        font-size: 12px;
    }
    .select-group select {
        font-size: 13px;
        border-radius: 8px;
        padding: 6px 10px;
        padding-right: 20px;
    }
}

#shareAccessPrompt { display: none; }

/* Language dropdown menu styles */
.lang-icon {
    /* Remove absolute positioning styles since they're now in style.css */
    /* These styles are now handled in the main style.css file */
}

.lang-dropdown {
    /* Remove conflicting styles since they're now in style.css */
    /* These styles are now handled in the main style.css file */
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    position: relative;
    /* Remove conflicting padding since it's now in style.css */
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

/* Updated container spacing */
.container {
    margin-top: 0;
    padding-top: 15px;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    /* Remove conflicting mobile styles since they're now in style.css */
    .site-logo {
        font-size: 18px;
    }
}

/* Toggle switch styles (moved from index.html) */
.mode-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    background-color: #f9f9f9;
    border-radius: 0 0 8px 8px;
    margin-bottom: 10px;
    border-top: 1px solid #e6e6e6;
}

.mode-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #409eff;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 14px;
    color: #606266;
}

@media (max-width: 480px) {
    .toggle-switch {
        width: 40px;
        height: 20px;
    }
    
    .toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(20px);
    }
    
    .toggle-label {
        font-size: 12px;
    }
}

/* Updated batch actions styles for better responsiveness */
.batch-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.short-url-wrapper,
.toggle-all-wrapper {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#enableShortUrl, 
#toggleAllFiles {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.short-url-label, 
.toggle-all-label {
    margin-left: 5px;
    font-size: 14px;
    color: #606266;
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .batch-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 100%;
        padding: 5px 0;
    }
    
    .short-url-wrapper,
    .toggle-all-wrapper {
        order: 1;
        margin-right: 8px;
    }
    
    #shareSelected,
    .copyall {
        order: 2;
        flex: 0 0 auto;
    }
}

@media (max-width: 480px) {
    .batch-actions {
        gap: 4px;
        padding: 3px 0;
    }
    
    .short-url-wrapper,
    .toggle-all-wrapper {
        margin-right: 4px;
        margin-bottom: 2px;
    }
    
    .short-url-label, 
    .toggle-all-label {
        font-size: 11px;
        margin-left: 2px;
    }
    
    #enableShortUrl, 
    #toggleAllFiles {
        width: 13px;
        height: 13px;
    }
}

@media (max-width: 360px) {
    .batch-actions {
        justify-content: space-around;
        gap: 2px;
    }
    
    .short-url-wrapper,
    .toggle-all-wrapper {
        margin-right: 2px;
        margin-bottom: 0;
    }
    
    /* 在超小屏幕上，将复选框组合并到一行 */
    .batch-actions > div {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    /* 按钮组单独一行 */
    .action-button, 
    .copyall {
        margin-top: 3px;
    }
}
