/* PhotoViewer 公共组件样式 */

/* 全屏模态框 */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    flex-direction: column;
}

.fullscreen-modal.active {
    display: flex;
}

/* 顶部信息栏 */
.fullscreen-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 8px;
    pointer-events: none;
    text-align: center;
    max-width: 80%;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
}

.fullscreen-info .photo-time {
    font-size: 14px;
    opacity: 0.9;
}

.fullscreen-info .client-info {
    padding-left: 15px;
    border-left: 1px solid rgba(255,255,255,0.3);
    font-size: 15px;
    font-weight: 600;
    color: #00ff88;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* 关闭按钮 */
.fullscreen-close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.2s ease;
}

.fullscreen-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* 主内容区 */
.fullscreen-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* 图片容器 */
.fullscreen-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

.fullscreen-container:active {
    cursor: grabbing;
}

.fullscreen-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    transform-origin: center center;
}

/* 左右导航按钮 */
.fullscreen-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    transition: all 0.2s ease;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.fullscreen-nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.05);
}

.fullscreen-nav-btn.prev {
    left: 20px;
}

.fullscreen-nav-btn.next {
    right: 20px;
}

.fullscreen-nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    transform: translateY(-50%);
}

/* 提示文字 */
.fullscreen-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 12px;
    opacity: 0.6;
    pointer-events: none;
}

/* 底部工具栏 */
.fullscreen-toolbar {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fullscreen-toolbar-btn {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fullscreen-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.fullscreen-toolbar-btn.close:hover {
    background: rgba(100, 100, 100, 0.5);
}

.fullscreen-toolbar-btn.delete {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
}

.fullscreen-toolbar-btn.delete:hover {
    background: rgba(244, 67, 54, 0.5);
}

/* AI 面板收起后的右侧展开按钮 */
.ai-panel-toggle {
    position: absolute;
    top: 80px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    background: rgba(30, 30, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: white;
    cursor: pointer;
    z-index: 3000;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.ai-panel-toggle:hover {
    background: rgba(102, 126, 234, 0.35);
    border-color: rgba(102, 126, 234, 0.5);
}

.ai-panel-toggle-text {
    font-size: 15px;
    writing-mode: vertical-lr;
    letter-spacing: 3px;
    font-weight: 600;
}

/* AI 预读分析面板 */
.ai-preanalysis-panel {
    width: 380px;
    background: rgba(30, 30, 40, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    color: white;
}

.ai-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.ai-panel-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ai-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.ai-panel-title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-panel-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.ai-panel-status.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.ai-panel-status.status-confirmed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.ai-panel-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-client-info {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 13px;
}

.ai-client-label {
    color: rgba(255, 255, 255, 0.6);
}

.ai-client-value {
    color: #00ff88;
    font-weight: 500;
}

.ai-result-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-analysis-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s ease;
}

.ai-analysis-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
}

.ai-analysis-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ai-word-count {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.ai-word-count.warning {
    color: #ff9800;
}

.ai-word-count.error {
    color: #f44336;
}

.ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-btn {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.ai-btn:hover {
    transform: translateY(-1px);
}

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

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

.ai-btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ai-btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.ai-btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.ai-btn-success:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.ai-btn-danger {
    background: rgba(244, 67, 54, 0.2);
    color: #ff5252;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.ai-btn-danger:hover:not(:disabled) {
    background: rgba(244, 67, 54, 0.3);
}

.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
}

.ai-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.ai-loading-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.ai-error {
    padding: 12px 16px;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    color: #ff5252;
    font-size: 13px;
}

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

/* 调整：当有AI面板时，右导航按钮位置 */
.fullscreen-modal.show-ai-panel .fullscreen-nav-btn.next {
    right: 420px;
}

.fullscreen-modal.show-ai-panel .ai-preanalysis-panel {
    display: flex;
}

.fullscreen-modal:not(.show-ai-panel) .ai-preanalysis-panel {
    display: none;
}
