/**
 * LawSave Revision - Navy & White
 */
.error {
    border-color: #0B2A4A !important;
    background-color: rgba(11, 42, 74, 0.08) !important;
}
.error-message { color: #0B2A4A; font-size: 0.875rem; margin-top: 0.5rem; display: block; }

.revision-error {
    background: rgba(11, 42, 74, 0.08);
    border: 1px solid #0B2A4A;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #0B2A4A;
}
.revision-loading { text-align: center; padding: 20px; color: #2d4a6b; }

.spinner {
    border: 3px solid #f8f9fa;
    border-top: 3px solid #0B2A4A;
    border-radius: 50%;
    width: 40px; height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.revision-modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5); z-index: 10000;
    align-items: center; justify-content: center; padding: 20px;
}
.revision-modal-content {
    background: #FFFFFF;
    border-radius: 12px;
    max-width: 600px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.revision-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px; border-bottom: 1px solid #c5d0de;
}
.revision-modal-header h2 { margin: 0; color: #0B2A4A; font-size: 1.5rem; }

.close-btn {
    background: none; border: none; font-size: 28px;
    color: #2d4a6b; cursor: pointer;
    padding: 0; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center; border-radius: 4px;
}
.close-btn:hover { background: #f8f9fa; }

.revision-modal-body { padding: 24px; }
.mode-selection { margin: 24px 0; }
.mode-selection label:first-child { display: block; font-weight: 600; color: #0B2A4A; margin-bottom: 12px; }
.mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mode-option { cursor: pointer; }
.mode-option input[type="radio"] { display: none; }

.mode-card {
    padding: 16px;
    border: 2px solid #c5d0de;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
    background: #FFFFFF;
}
.mode-option input[type="radio"]:checked + .mode-card {
    border-color: #0B2A4A;
    background: rgba(11, 42, 74, 0.06);
}
.mode-card strong { display: block; color: #0B2A4A; margin-bottom: 8px; }
.mode-card p { margin: 0; color: #2d4a6b; font-size: 0.875rem; }

.email-confirmation { margin: 24px 0; }
.email-confirmation label { display: block; font-weight: 600; color: #0B2A4A; margin-bottom: 8px; }
.email-confirmation input {
    width: 100%; padding: 12px;
    border: 1px solid #c5d0de; border-radius: 6px;
    font-size: 1rem; box-sizing: border-box;
}
.email-confirmation input:focus { outline: none; border-color: #0B2A4A; }
.email-note { font-size: 0.875rem; color: #2d4a6b; margin-top: 8px; }

.revision-actions {
    display: flex; gap: 12px; justify-content: flex-end;
    margin-top: 24px; padding-top: 24px; border-top: 1px solid #c5d0de;
}
.btn-primary, .btn-secondary {
    padding: 12px 24px; border-radius: 6px;
    font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
}
.btn-primary { background: #0B2A4A; color: white; }
.btn-primary:hover:not(:disabled) { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: #FFFFFF; color: #0B2A4A; border: 1px solid #c5d0de; }
.btn-secondary:hover { background: #f8f9fa; }

.btn-export {
    padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 600;
    border: 1px solid #0B2A4A; background: #0B2A4A; color: white; transition: all 0.2s;
}
.btn-export:hover:not(:disabled) { opacity: 0.9; }
.btn-export:disabled { opacity: 0.6; cursor: not-allowed; }

.revision-preview-panel {
    position: fixed; top: 20px; right: 20px;
    width: 400px; max-height: 80vh;
    background: #FFFFFF; border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999; display: none; overflow-y: auto;
}
.preview-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #c5d0de;
}
.preview-header h3 { margin: 0; color: #0B2A4A; font-size: 1.25rem; }
.preview-summary {
    background: rgba(11, 42, 74, 0.06);
    padding: 16px; border-radius: 8px; margin-bottom: 16px;
}
.preview-summary p { margin: 8px 0; color: #0B2A4A; }
.preview-summary .success { color: #0B2A4A; font-weight: 600; }
.preview-summary .warning { color: #0B2A4A; font-weight: 600; }

.preview-changes h4, .preview-summary-text h4 { color: #0B2A4A; margin-bottom: 12px; }
.change-item {
    background: #f8f9fa; padding: 12px; border-radius: 6px;
    margin: 8px 0; border-left: 3px solid #0B2A4A;
}
.change-item strong { color: #0B2A4A; display: block; margin-bottom: 8px; }
.change-item p { margin: 4px 0; font-size: 0.875rem; color: #2d4a6b; }

.preview-downloads { margin-top: 20px; padding-top: 20px; border-top: 1px solid #c5d0de; }
.download-link {
    display: inline-block; padding: 10px 20px;
    background: #0B2A4A; color: white;
    text-decoration: none; border-radius: 6px;
    margin: 8px 8px 8px 0; font-weight: 600;
}
.download-link:hover { opacity: 0.9; }

.suggest-revision-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; background: #0B2A4A; color: white;
    border: none; border-radius: 8px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.suggest-revision-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.suggest-revision-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.revision-history-modal, .revision-details-modal {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5); z-index: 10001;
    align-items: center; justify-content: center; padding: 20px;
}
.revision-history-content, .revision-details-content {
    background: #FFFFFF; border-radius: 12px;
    max-width: 800px; width: 100%; max-height: 90vh;
    overflow-y: auto; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.revision-item { border: 1px solid #c5d0de; border-radius: 8px; padding: 16px; }
.revision-mode {
    display: inline-block; padding: 4px 8px;
    background: rgba(11, 42, 74, 0.1); color: #0B2A4A;
    border-radius: 4px; font-size: 0.875rem;
}
.revision-date, .revision-summary { color: #2d4a6b; font-size: 0.875rem; }

.btn-view, .btn-compare {
    padding: 8px 16px; border-radius: 6px;
    border: 1px solid #c5d0de; background: #FFFFFF;
    color: #0B2A4A; cursor: pointer; font-size: 0.875rem;
}
.btn-view:hover, .btn-compare:hover {
    background: #f8f9fa; border-color: #0B2A4A; color: #0B2A4A;
}
.no-revisions { text-align: center; color: #2d4a6b; padding: 40px; }

.revision-summary-section {
    margin: 20px 0; padding: 16px;
    background: rgba(11, 42, 74, 0.06); border-radius: 8px;
}
.revision-summary-section h3 { color: #0B2A4A; }

.revision-billing-info {
    background: rgba(11, 42, 74, 0.08);
    border: 1px solid #0B2A4A;
    border-radius: 8px; padding: 12px; margin: 16px 0; font-size: 0.875rem;
}
.revision-billing-info.free {
    background: rgba(11, 42, 74, 0.06);
    border-color: #0B2A4A;
}
.revision-billing-info strong { color: #0B2A4A; }

@media (max-width: 640px) {
    .mode-options { grid-template-columns: 1fr; }
    .revision-preview-panel { width: calc(100% - 40px); right: 20px; left: 20px; }
}
