/**
 * PDF Interactive Form Filling - Adobe Style CSS
 */

/* PDF Interactive Section */
.pdf-interactive-section {
    margin: 30px 0;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.pdf-toolbar .btn {
    margin: 0 5px;
}

/* PDF Viewer with Overlays */
.pdf-viewer-interactive {
    position: relative;
    background: #525252;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    min-height: 600px;
    display: flex;
    justify-content: center;
}

.pdf-canvas-wrapper {
    position: relative;
    display: inline-block;
}

#pdf-canvas {
    display: block;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Field Overlays on PDF */
.pdf-field-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pdf-field-marker {
    pointer-events: all;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-field-marker:hover {
    background: rgba(0, 102, 204, 0.2) !important;
    border-color: #ff6600 !important;
}

/* Current Field Input - Adobe Style */
.current-field-input {
    margin: 30px auto;
    max-width: 1200px;
}

.field-input-card {
    background: white;
    border: 2px solid #0066cc;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.progress-summary {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.field-label-large {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.field-input-large {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.field-input-large:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.field-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    gap: 15px;
}

#field-progress {
    color: #666;
    font-weight: 500;
}

.btn-large {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
}

/* Signature Overlay - Modal Style */
.signature-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-modal {
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.signature-modal h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.signature-modal p {
    color: #666;
    margin-bottom: 20px;
}

.signature-pad-wrapper {
    border: 3px solid #0066cc;
    border-radius: 4px;
    background: white;
    margin-bottom: 20px;
}

#signature-canvas {
    display: block;
    width: 100%;
    height: 200px;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

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

/* Keyframe Animations */
@keyframes pulse-field {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 102, 0, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 102, 0, 0.9);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .pdf-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .current-field-input > div {
        grid-template-columns: 1fr !important;
    }
    
    .field-input-card {
        padding: 20px;
    }
    
    .field-navigation {
        flex-direction: column;
    }
    
    .field-navigation .btn {
        width: 100%;
    }
    
    .signature-modal {
        padding: 20px;
    }
}

/* =====================================================
   Powered By Branding (Free Version)
   ===================================================== */
.psf-powered-by {
    margin-top: 15px;
    padding: 10px 0;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.psf-powered-by:hover {
    opacity: 1;
}

.psf-powered-by a {
    font-size: 12px;
    color: #999;
    text-decoration: none;
    font-weight: 400;
}

.psf-powered-by a:hover {
    color: #666;
    text-decoration: underline;
}
