/**
 * SIGN CONFIRMATION DIALOG STYLES
 * ESIGN Act Compliant Signature Preview
 */

/* Overlay - full screen dim */
#sign-confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Main Dialog Container */
#sign-confirmation-dialog {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
#sign-confirmation-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

#sign-confirmation-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

#sign-confirmation-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.sign-confirmation-subtitle {
    margin: 8px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Content Area */
#sign-confirmation-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Document Preview Section */
#sign-document-preview {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

#sign-document-preview h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#sign-document-type-badge {
    display: inline-block;
    background: #8b5cf6;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

#sign-document-content {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    max-height: 200px;
    overflow-y: auto;
}

/* Text Preview */
.preview-text-content {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.preview-text-scroll {
    max-height: 150px;
    overflow-y: auto;
}

/* Image Preview */
.preview-image-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-image-placeholder {
    text-align: center;
    padding: 20px;
    background: #f0fdf4;
    border-radius: 8px;
    width: 100%;
}

.preview-image-label {
    font-weight: 600;
    margin-top: 12px;
    color: #166534;
}

.preview-image-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Audio Preview */
.preview-audio-content {
    background: #fffbeb;
    border-radius: 8px;
    padding: 16px;
}

.preview-audio-player {
    display: flex;
    align-items: center;
    gap: 16px;
}

.preview-audio-info {
    flex: 1;
}

.preview-audio-filename {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 8px;
}

.preview-audio-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 24px;
}

.waveform-bar {
    width: 4px;
    background: #f59e0b;
    border-radius: 2px;
    animation: waveform 1s ease-in-out infinite;
}

.waveform-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.waveform-bar:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.waveform-bar:nth-child(3) { height: 90%; animation-delay: 0.2s; }
.waveform-bar:nth-child(4) { height: 50%; animation-delay: 0.3s; }
.waveform-bar:nth-child(5) { height: 70%; animation-delay: 0.4s; }
.waveform-bar:nth-child(6) { height: 40%; animation-delay: 0.5s; }
.waveform-bar:nth-child(7) { height: 80%; animation-delay: 0.6s; }
.waveform-bar:nth-child(8) { height: 55%; animation-delay: 0.7s; }

@keyframes waveform {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.preview-audio-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

/* Video Preview */
.preview-video-content {
    background: #fef2f2;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.preview-video-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.preview-video-filename {
    font-weight: 600;
    color: #991b1b;
}

.preview-video-hint {
    font-size: 12px;
    color: #6b7280;
}

/* Location Preview */
.preview-location-content {
    background: #eff6ff;
    border-radius: 8px;
    padding: 16px;
}

.preview-location-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.preview-location-coords {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #1e40af;
    background: #dbeafe;
    padding: 8px 16px;
    border-radius: 4px;
}

.preview-location-hint {
    font-size: 12px;
    color: #6b7280;
}

/* File Preview */
.preview-file-content {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
}

.preview-file-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.preview-file-ext {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: #6b7280;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
}

.preview-file-info {
    flex: 1;
}

.preview-file-filename {
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.preview-file-hint {
    font-size: 12px;
    color: #6b7280;
}

#sign-document-hash {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #d1d5db;
}

.hash-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.hash-value {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #8b5cf6;
    word-break: break-all;
    display: block;
}

/* Signature Details Section */
#sign-signature-details {
    margin-bottom: 24px;
}

#sign-signature-details h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #374151;
}

.signature-tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.tech-item {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
}

.tech-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.tech-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.tech-spec {
    display: block;
    font-size: 10px;
    color: #6b7280;
}

/* Legal Requirements Section */
#sign-legal-requirements {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
}

#sign-legal-requirements h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #92400e;
}

#sign-legal-text {
    font-size: 13px;
    line-height: 1.6;
    color: #78350f;
    margin-bottom: 20px;
}

#sign-legal-text p {
    margin: 0 0 12px 0;
}

#sign-legal-text ol {
    margin: 0;
    padding-left: 20px;
}

#sign-legal-text li {
    margin-bottom: 6px;
}

/* Intent Checkbox */
#sign-intent-checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: white;
    padding: 16px;
    border-radius: 6px;
    border: 2px solid #d1d5db;
    transition: border-color 0.2s;
}

#sign-intent-checkbox-container:hover {
    border-color: #8b5cf6;
}

#sign-intent-checkbox-container.checked {
    border-color: #10b981;
    background: #ecfdf5;
}

#sign-intent-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #8b5cf6;
}

#sign-intent-label {
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

/* Action Buttons */
#sign-confirmation-actions {
    display: flex;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.sign-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sign-button-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.sign-button-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.sign-button-primary:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.sign-button-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #d1d5db;
}

.sign-button-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    #sign-confirmation-dialog {
        width: 95%;
        max-height: 95vh;
        border-radius: 8px;
    }

    #sign-confirmation-header {
        padding: 16px;
    }

    #sign-confirmation-header h2 {
        font-size: 18px;
    }

    #sign-confirmation-content {
        padding: 16px;
    }

    .signature-tech-grid {
        grid-template-columns: 1fr;
    }

    #sign-confirmation-actions {
        flex-direction: column;
        padding: 16px;
    }

    .sign-button {
        width: 100%;
    }

    #sign-document-content {
        max-height: 100px;
        font-size: 12px;
    }
}

/* Animations */
@keyframes signDialogSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#sign-confirmation-dialog {
    animation: signDialogSlideIn 0.3s ease-out;
}
