/* Amazon S3 Settings Dialog Styles */

/* S3 dialog: limit height to viewport, make body scrollable */
#s3-settings-dialog .dialog-container {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#s3-settings-dialog .dialog-header {
    flex-shrink: 0;
}

#s3-settings-dialog .dialog-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#s3-settings-dialog .dialog-footer {
    flex-shrink: 0;
}

.s3-info-section {
    margin-bottom: 20px;
}

.s3-info-section:last-child {
    margin-bottom: 0;
}

.s3-welcome-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 20px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 6px;
    font-size: 13px;
    color: #096dd9;
    line-height: 1.6;
}

.s3-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.s3-info-grid {
    display: grid;
    gap: 12px;
}

.s3-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.s3-info-item label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.s3-info-value {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f8fa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 8px 12px;
}

.s3-info-value code {
    flex: 1;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    color: #333;
    word-break: break-all;
    user-select: all;
}

.s3-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.s3-copy-btn:hover {
    background: #e8e8e8;
    color: #333;
}

.s3-hint {
    font-size: 12px;
    color: #888;
    margin: 6px 0 0 0;
    line-height: 1.5;
}

.s3-warning-hint {
    font-size: 12px;
    color: #d48806;
    margin: 6px 0 0 0;
    padding: 8px 12px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    line-height: 1.5;
}

.s3-danger-hint {
    font-size: 12px;
    color: #cf1322;
    margin: 6px 0 0 0;
    padding: 8px 12px;
    background: #fff1f0;
    border: 1px solid #ffa39e;
    border-radius: 4px;
    line-height: 1.5;
}

.s3-credential-group {
    background: #f7f8fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.s3-credential-group .s3-info-item:last-child {
    margin-bottom: 0;
}

.s3-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.s3-badge-yes {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

.s3-badge-auto {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.s3-badge-no {
    background: #fff1f0;
    color: #cf1322;
    border: 1px solid #ffa39e;
}

.s3-badge-info {
    background: #f9f0ff;
    color: #722ed1;
    border: 1px solid #d3adf7;
}

.s3-inline-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

.s3-inline-badge-warn {
    background: #fff7e6;
    color: #d48806;
    border: 1px solid #ffd591;
}

.s3-inline-badge-danger {
    background: #fff1f0;
    color: #cf1322;
    border: 1px solid #ffa39e;
}

.s3-auth-modes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.s3-auth-mode-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #f0f5ff;
    color: #2f54eb;
    border: 1px solid #adc6ff;
}

.s3-auth-mode-tag svg {
    width: 14px;
    height: 14px;
}

.s3-loading {
    text-align: center;
    padding: 40px 16px;
    color: #999;
    font-size: 14px;
}

.s3-ops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.s3-op-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f7f8fa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
}

.s3-op-label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

@media (max-width: 480px) {
    .s3-ops-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.s3-loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f0f0f0;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: s3-spin 0.8s linear infinite;
    margin-bottom: 8px;
}

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