/**
 * OVZA Notary Verify CSS - Version 3
 * Direct flow: Upload docs → Generate notary link
 */

.ovza-notary-verify-wrapper {
    max-width: 750px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner .spinner {
    width: 45px;
    height: 45px;
    border: 5px solid #e0e0e0;
    border-top-color: #148a64;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Header */
.verify-header {
    text-align: center;
    margin-bottom: 25px;
}

.verify-header h2 {
    color: #148a64;
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 600;
}

.verify-header p {
    color: #666;
    margin: 0 0 12px;
    font-size: 15px;
}

.order-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #148a64;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Progress Summary */
.progress-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 15px 25px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 25px;
}

.progress-item {
    text-align: center;
}

.progress-count {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #148a64;
}

.progress-label {
    font-size: 13px;
    color: #666;
}

.progress-divider {
    width: 1px;
    height: 40px;
    background: #ddd;
}

/* Verify Cards */
.verify-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s;
}

.verify-card.completed {
    border-color: #4caf50;
}

.verify-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background 0.2s;
}

.verify-card-header:hover {
    background: #f0f0f0;
}

.verify-card.completed .verify-card-header {
    background: #e8f5e9;
}

.person-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.person-icon {
    font-size: 24px;
}

.person-details {
    display: flex;
    flex-direction: column;
}

.person-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.person-meta {
    font-size: 13px;
    color: #666;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.ready {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.completed {
    background: #d4edda;
    color: #155724;
}

.expand-icon {
    font-size: 16px;
    color: #666;
    transition: transform 0.3s;
}

.verify-card.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Card Content */
.verify-card-content {
    padding: 20px;
    display: none;
    border-top: 1px solid #e0e0e0;
}

.verify-card.expanded .verify-card-content {
    display: block;
}

/* Upload Notice */
.upload-notice {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.upload-notice p {
    margin: 0;
    color: #1565c0;
}

.upload-notice .notice-hint {
    font-size: 13px;
    margin-top: 5px;
}

/* Docs Uploaded Notice */
.docs-uploaded-notice {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.docs-uploaded-notice p {
    margin: 0;
    color: #155724;
}

.docs-uploaded-notice .notice-hint {
    font-size: 13px;
    margin-top: 5px;
}

/* Upload Form */
.upload-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-fields-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-field label {
    min-width: 100px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.upload-field label .required {
    color: #d63031;
}

.file-input-wrapper {
    flex: 1;
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-input-wrapper:hover {
    border-color: #148a64;
    background: #f8fff9;
}

.file-input-wrapper.has-file {
    border-color: #4caf50;
    border-style: solid;
    background: #e8f5e9;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-input-wrapper .placeholder {
    color: #666;
    font-size: 13px;
}

.file-input-wrapper .filename {
    color: #4caf50;
    font-weight: 600;
    font-size: 13px;
}

.remove-doc-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #f5f5f5;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.remove-doc-btn:hover {
    background: #ffebee;
    color: #d63031;
}

.add-doc-btn {
    padding: 10px 15px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-doc-btn:hover {
    background: #e8f5e9;
    border-color: #148a64;
    color: #148a64;
}

/* Confirm Checkbox */
.confirm-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
}

.confirm-checkbox input {
    margin-top: 2px;
    width: 22px;
    height: 22px;
    min-width: 22px;
    accent-color: #148a64;
    cursor: pointer;
    flex-shrink: 0;
}

/* Improve checkbox visibility */
.confirm-checkbox input[type="checkbox"]:not(:checked) {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 2px solid #148a64;
    border-radius: 4px;
    position: relative;
}

.confirm-checkbox input[type="checkbox"]:checked {
    appearance: none;
    -webkit-appearance: none;
    background: #148a64;
    border: 2px solid #148a64;
    border-radius: 4px;
    position: relative;
}

.confirm-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.confirm-checkbox span {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    line-height: 1.5;
}

/* Buttons */
.upload-btn {
    width: 100%;
    padding: 14px;
    background: #148a64;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.upload-btn:hover:not(:disabled) {
    background: #0f6d4d;
}

.upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.generate-btn {
    width: 100%;
    padding: 14px;
    background: #148a64;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.generate-btn:hover:not(:disabled) {
    background: #0f6d4d;
}

.generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}


/* Completed State */
.completed-notice {
    padding: 0;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.success-message h4 {
    margin: 0 0 10px;
    color: #155724;
    font-size: 15px;
}

.success-message ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #155724;
}

.email-tip {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #1565c0;
}

.link-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.link-box label {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.link-url {
    color: #148a64;
    word-break: break-all;
    font-family: monospace;
    font-size: 13px;
    display: block;
    margin-bottom: 12px;
}

.link-buttons {
    display: flex;
    gap: 10px;
}

.link-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.copy-btn {
    background: #4caf50;
    color: #fff;
}

.copy-btn:hover {
    background: #43a047;
}

.open-btn {
    background: #148a64;
    color: #fff;
}

.open-btn:hover {
    background: #0f6d4d;
}

/* Complete Section */
.complete-section {
    margin-top: 25px;
    text-align: center;
}

.complete-btn {
    padding: 16px 50px;
    background: #148a64;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.complete-btn:hover:not(:disabled) {
    background: #0f6d4d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(20, 138, 100, 0.3);
}

.complete-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pending-message {
    margin-top: 12px;
    font-size: 14px;
    color: #856404;
}

/* Help Section */
.help-section {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.help-section a {
    color: #148a64;
    text-decoration: none;
}

.help-section a:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 30px;
    background: #fff3cd;
    border-radius: 12px;
    color: #856404;
}

.error-message p {
    margin: 0 0 15px;
}

.refresh-btn {
    padding: 10px 25px;
    background: #148a64;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.refresh-btn:hover {
    background: #0f6d4d;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: #fff;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 24px 0;
    text-align: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.modal-body {
    padding: 20px 24px;
}

.modal-person-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-person-info .person-icon {
    font-size: 28px;
}

.modal-person-info .person-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.modal-person-info .person-email {
    font-size: 13px;
    color: #666;
}

.modal-info {
    color: #555;
}

.modal-info p {
    margin: 0 0 10px;
    font-weight: 600;
}

.modal-info ul {
    margin: 0;
    padding-left: 20px;
}

.modal-info li {
    margin-bottom: 6px;
    font-size: 14px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.cancel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.modal-btn.cancel:hover {
    background: #e9e9e9;
}

.modal-btn.confirm {
    background: #148a64;
    color: #fff;
    border: none;
}

.modal-btn.confirm:hover {
    background: #0f6d4d;
}

/* Responsive */
@media (max-width: 600px) {
    .ovza-notary-verify-wrapper {
        padding: 15px;
    }
    
    .verify-card-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .person-info {
        flex-direction: column;
        text-align: center;
    }
    
    .upload-field {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-field label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .link-buttons {
        flex-direction: column;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        padding: 12px;
    }
}
