/*
#	Project: Supfile System - A powerful file management system 
#   * Large file support, multi-file/multi-task processing
#   * Concurrent uploads, drag-and-drop functionality
#   * Easy to deploy and highly functional.
#
#	This is NOT a freeware, use is subject to license terms.
#
#	Website: http://www.phpdisk.com
#
#	Author: Along ( admin@phpdisk.com , phpdisk@outlook.com)
#
#	$Id$
#
#	Copyright (C) 2008-2083 PHPDisk Team. All Rights Reserved.
*/

/* ============================================
   自定义弹窗框架样式（支持主题切换）
   ============================================ */

/* 弹窗遮罩层 */
.supfile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.supfile-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.supfile-modal {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.supfile-modal-overlay.active .supfile-modal {
    transform: scale(1) translateY(0);
}

/* 弹窗头部 */
.supfile-modal-header {
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-white);
}

.supfile-modal-title {
    font-size: 1em;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.supfile-modal-close {
    background: #dc3545;
    border: none;
    color: var(--text-white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    font-weight: bold;
}

.supfile-modal-close:hover {
    background: #c82333;
    transform: rotate(90deg);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* 弹窗内容区域 */
.supfile-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    color: var(--text-primary);
}

.supfile-modal-message {
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
}

/* 弹窗输入框 */
.supfile-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9em;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-top: 12px;
    box-sizing: border-box;
}

.supfile-modal-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* 弹窗底部按钮区域 */
.supfile-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-secondary);
}

/* 弹窗按钮 */
.supfile-modal-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.supfile-modal-btn-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-white);
}

.supfile-modal-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.supfile-modal-btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.supfile-modal-btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.supfile-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 弹窗图标 */
.supfile-modal-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.supfile-modal-icon-success {
    color: var(--success-color);
}

.supfile-modal-icon-error {
    color: var(--danger-color);
}

.supfile-modal-icon-warning {
    color: var(--warning-color);
}

.supfile-modal-icon-info {
    color: var(--info-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .supfile-modal {
        min-width: 280px;
        max-width: 95%;
        margin: 20px;
    }
    
    .supfile-modal-header {
        padding: 16px 20px;
    }
    
    .supfile-modal-body {
        padding: 20px;
    }
    
    .supfile-modal-footer {
        padding: 12px 20px;
        flex-direction: column-reverse;
    }
    
    .supfile-modal-btn {
        width: 100%;
    }
}

/* 消息提示样式（简化版，用于 msg） */
.supfile-msg {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    max-width: 80%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.supfile-msg.active {
    opacity: 1;
    visibility: visible;
}

.supfile-msg-icon {
    font-size: 1.3em;
    flex-shrink: 0;
}

.supfile-msg-text {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.5;
}

/* ============================================
   分享文件弹窗样式
   ============================================ */

/* 分享弹窗容器 */
.share-dialog-container {
    padding: 20px;
    font-size: 0.9em;
}

/* 分享弹窗字段 */
.share-dialog-field {
    margin-bottom: 12px;
}

/* 分享弹窗标签 */
.share-dialog-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* 资源名称显示区域 */
.share-dialog-resource-name {
    padding: 8px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-primary);
}

/* 分享弹窗复选框 */
.share-dialog-checkbox {
    margin-right: 5px;
}

/* 分享设置区域 */
.share-dialog-settings {
    margin-bottom: 12px;
}

.share-dialog-settings-item {
    margin-bottom: 8px;
}

/* 分享弹窗输入框 */
.share-dialog-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
    background: var(--bg-primary, #fff);
    color: var(--text-primary);
}

.share-dialog-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* 分享结果区域 */
.share-dialog-result {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 4px;
    border: 1px solid var(--border-color, #e0e0e0);
}

.share-dialog-result.show {
    display: block;
}

.share-dialog-result-label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* 分享链接显示区域 */
.share-dialog-url {
    padding: 8px;
    background: var(--bg-primary, #ffffff);
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
    margin-bottom: 8px;
    font-size: 0.85em;
    color: var(--text-primary);
    border: 1px solid var(--border-color, #e0e0e0);
}

/* 分享弹窗按钮 */
.share-dialog-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.share-dialog-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* 创建分享按钮 */
.share-dialog-btn-create {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.share-dialog-btn-create:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .share-dialog-container {
        padding: 16px;
    }
    
    .share-dialog-input {
        padding: 6px;
    }
    
    .share-dialog-btn {
        padding: 6px 12px;
    }
    
    .share-dialog-btn-create {
        padding: 8px 16px;
    }
}

/* ============================================
   Tips 提示框样式
   ============================================ */

.supfile-tips {
    position: fixed;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.supfile-tips.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.supfile-tips-content {
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary, #333);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color, #e0e0e0);
    font-size: 0.9em;
    line-height: 1.6;
    max-width: 100%;
    word-wrap: break-word;
    white-space: pre-line;
}

/* Tips 箭头 */
.supfile-tips-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* 底部箭头（tips 在上方） */
.supfile-tips-bottom .supfile-tips-arrow {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-color: var(--bg-primary, #ffffff) transparent transparent transparent;
}

/* 顶部箭头（tips 在下方） */
.supfile-tips-top .supfile-tips-arrow {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent var(--bg-primary, #ffffff) transparent;
}

/* 左侧箭头（tips 在右侧） */
.supfile-tips-left .supfile-tips-arrow {
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--bg-primary, #ffffff) transparent transparent;
}

/* 右侧箭头（tips 在左侧） */
.supfile-tips-right .supfile-tips-arrow {
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--bg-primary, #ffffff);
}

/* 箭头边框（用于显示边框效果） */
.supfile-tips-bottom .supfile-tips-arrow::before {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-color: var(--border-color, #e0e0e0) transparent transparent transparent;
    border-style: solid;
}

.supfile-tips-top .supfile-tips-arrow::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent var(--border-color, #e0e0e0) transparent;
    border-style: solid;
}

.supfile-tips-left .supfile-tips-arrow::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--border-color, #e0e0e0) transparent transparent;
    border-style: solid;
}

.supfile-tips-right .supfile-tips-arrow::before {
    content: '';
    position: absolute;
    right: 1px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--border-color, #e0e0e0);
    border-style: solid;
}

/* 暗色主题 */
[data-theme="dark"] .supfile-tips-content {
    background: var(--bg-primary, #2a2a2a);
    color: var(--text-primary, #e0e0e0);
    border-color: var(--border-color, #404040);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .supfile-tips-bottom .supfile-tips-arrow {
    border-color: var(--bg-primary, #2a2a2a) transparent transparent transparent;
}

[data-theme="dark"] .supfile-tips-top .supfile-tips-arrow {
    border-color: transparent transparent var(--bg-primary, #2a2a2a) transparent;
}

[data-theme="dark"] .supfile-tips-left .supfile-tips-arrow {
    border-color: transparent var(--bg-primary, #2a2a2a) transparent transparent;
}

[data-theme="dark"] .supfile-tips-right .supfile-tips-arrow {
    border-color: transparent transparent transparent var(--bg-primary, #2a2a2a);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .supfile-tips-content {
        font-size: 0.85em;
        padding: 10px 14px;
        max-width: 280px;
    }
}

/* ============================================
   弹窗内表单样式优化
   ============================================ */

/* 弹窗内表单字体大小调整 */
.supfile-modal .form-floating,
.supfile-modal .form-control,
.supfile-modal .form-label,
.supfile-modal .form-check-label,
.supfile-modal .form-check-input,
.supfile-modal .alert,
.supfile-modal .btn {
    font-size: 0.875rem; /* 14px，比默认的 16px 小 */
}

/* 弹窗内输入框 placeholder 颜色 */
.supfile-modal .form-control::placeholder {
    color: #999 !important;
    opacity: 1;
}

.supfile-modal .form-control::-webkit-input-placeholder {
    color: #999 !important;
    opacity: 1;
}

.supfile-modal .form-control::-moz-placeholder {
    color: #999 !important;
    opacity: 1;
}

.supfile-modal .form-control:-ms-input-placeholder {
    color: #999 !important;
    opacity: 1;
}

/* 弹窗内标签字体大小 */
.supfile-modal .form-floating > label {
    font-size: 0.875rem;
}

/* 弹窗内复选框和标签 */
.supfile-modal .form-check-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 弹窗内链接字体大小 */
.supfile-modal a {
    font-size: 0.875rem;
}

/* 弹窗内按钮字体大小 */
.supfile-modal-btn {
    font-size: 0.875rem;
}

/* 弹窗内标题字体大小 */
.supfile-modal-title {
    font-size: 1rem;
}

/* 弹窗内警告框字体大小 */
.supfile-modal .alert {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}
