/* ===================================
   AI Legal Lab - Custom Styles
   =================================== */

/* Root Variables */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --sidebar-width: 280px;
    --navbar-height: 60px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Navbar Customization */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: var(--navbar-height);
}

.navbar-brand {
    font-size: 1.2rem;
}

.navbar-dark .navbar-nav .nav-link {
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fbbf24 !important;
}

/* Main Layout Container */
.layout-wrapper {
    display: flex;
    flex: 1;
    position: relative;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    min-height: calc(100vh - var(--navbar-height));
    position: fixed;
    right: 0;
    top: var(--navbar-height);
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
    font-weight: 500;
}

.sidebar .nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-right-color: #fbbf24;
}

.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-right-color: white;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 2rem;
    transition: margin-right 0.3s ease;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1100;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.tool-card h5 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.tool-card .btn {
    width: 100%;
    padding: 0.625rem 1rem;
    font-weight: 600;
    border-radius: 8px;
}

/* Page Header */
.page-header {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--dark-color);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6b7280;
    margin-bottom: 0;
}

/* Footer */
.footer {
    margin-top: auto;
}

/* Theme Toggle */
body.dark-mode {
    background-color: #111827;
}

body.dark-mode .main-content,
body.dark-mode .tool-card,
body.dark-mode .page-header {
    background-color: #1f2937;
    color: #f3f4f6;
}

body.dark-mode .tool-card h5,
body.dark-mode .page-header h1 {
    color: #f3f4f6;
}

body.dark-mode .tool-card p,
body.dark-mode .page-header p {
    color: #9ca3af;
}

body.dark-mode .footer {
    background-color: #1f2937 !important;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
        padding: 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand span {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1rem;
    }

    .tool-card {
        padding: 1.25rem;
    }

    .mobile-menu-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeInUp 0.5s ease-out;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Utility Classes */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-custom {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ===================================
   Memo Analyzer Specific Styles
   =================================== */

/* Memo Editor Card */
.memo-editor-card {
    transition: all 0.3s ease;
}

.memo-editor-card .card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Memo Textarea */
.memo-textarea {
    font-family: 'Cairo', 'Tajawal', serif;
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.memo-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.15);
}

/* Analysis Panel */
.analysis-panel {
    /* position: sticky; */
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* Overall Score Circle */
.overall-score-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 2px solid #3b82f6;
}

.overall-score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.overall-score-circle.score-excellent {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.overall-score-circle.score-good {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.overall-score-circle.score-fair {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.overall-score-circle.score-poor {
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary-color);
}

.score-total {
    font-size: 1.2rem;
    color: #6b7280;
}

/* Detailed Scores */
.detailed-scores {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.score-item {
    background: white;
    padding: 0.75rem;
    border-radius: 6px;
}

.score-label {
    font-size: 0.9rem;
    color: #4b5563;
}

.score-value {
    font-size: 1rem;
    color: var(--primary-color);
}

/* AI Comments */
.ai-comments {
    padding: 1rem;
    background: #fffbeb;
    border-radius: 8px;
    border-right: 4px solid #f59e0b;
}

.comments-list {
    max-height: 300px;
    overflow-y: auto;
}

.comment-item {
    margin-bottom: 0.75rem;
}

.comment-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
}

/* History Panel */
.history-item {
    transition: all 0.2s ease;
    border-radius: 4px;
}

.history-item:hover {
    background: #f3f4f6;
}

/* Empty State */
#emptyState {
    opacity: 0.7;
}

/* Toast Container */
.toast-container {
    z-index: 9999;
}

/* Loading State */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsive Adjustments for Memo Analyzer */
@media (max-width: 991.98px) {
    .analysis-panel {
        position: static;
        max-height: none;
    }

    .overall-score-circle {
        width: 100px;
        height: 100px;
    }

    .score-number {
        font-size: 2.5rem;
    }
}

/* ===================================
   Scenario Generator Specific Styles
   =================================== */

/* Scenario Form Card */
.scenario-form-card {
    /* position: sticky; */
    top: 80px;
}

.scenario-form-card .form-select,
.scenario-form-card .form-control {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.scenario-form-card .form-select:focus,
.scenario-form-card .form-control:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.15);
}

/* Scenario Display Area */
.scenario-display {
    min-height: 400px;
}

/* Scenario Cards */
.scenario-card {
    animation: fadeInUp 0.5s ease-out;
    margin-bottom: 1rem;
}

.scenario-card .card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.scenario-content {
    line-height: 1.8;
    font-size: 1rem;
}

.scenario-content h6 {
    color: var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.scenario-content p {
    color: #374151;
}

/* Scenario Header Card */
.scenario-header-card {
    animation: fadeIn 0.5s ease-out;
}

/* Evidence and Legal Issues Lists */
#evidenceList li,
#legalIssuesList li {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

#evidenceList li:hover,
#legalIssuesList li:hover {
    background: #f3f4f6;
    transform: translateX(-4px);
}

/* History Items */
.history-item {
    transition: all 0.2s ease;
    cursor: pointer;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Animation for scenario cards */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Stagger animations for scenario sections */
.scenario-card:nth-child(1) { animation-delay: 0.1s; }
.scenario-card:nth-child(2) { animation-delay: 0.2s; }
.scenario-card:nth-child(3) { animation-delay: 0.3s; }
.scenario-card:nth-child(4) { animation-delay: 0.4s; }
.scenario-card:nth-child(5) { animation-delay: 0.5s; }
.scenario-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive adjustments for Scenario Generator */
@media (max-width: 991.98px) {
    .scenario-form-card {
        position: static;
    }
}

/* ============================================
   PHASE 4: LEGAL ASSISTANT CHAT STYLES
   ============================================ */

/* Chat Container */
.chat-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.25rem;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.chat-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-header-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8f9fa;
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Chat */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Message Styles */
.message {
    display: flex;
    margin-bottom: 1.25rem;
    align-items: flex-end;
    gap: 0.75rem;
}

/* User Message (Right-aligned) */
.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    text-align: right;
}

/* Assistant Message (Left-aligned) */
.assistant-message {
    flex-direction: row;
}

.assistant-message .message-content {
    text-align: right;
}

/* Error Message */
.error-message {
    flex-direction: row;
}

/* Message Avatar */
.message-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.assistant-message .message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.error-message .message-avatar {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Message Bubble */
.message-bubble {
    background: white;
    padding: 0.875rem 1.125rem;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    word-wrap: break-word;
    line-height: 1.6;
}

.user-message .message-bubble {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant-message .message-bubble {
    background: white;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.error-message .message-bubble {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.error-bubble {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
}

/* Message Time */
.message-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.375rem;
}

/* Message References */
.message-references {
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid #e5e7eb;
}

.message-references .badge {
    margin-bottom: 0.375rem;
    font-weight: 500;
}

/* Welcome Message */
.welcome-message .message-bubble {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #10b981;
    color: #065f46;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.typing-dots {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Chat Input Area */
.chat-input-area {
    border-top: 2px solid #e5e7eb;
    background: white;
    padding: 1rem 1.25rem;
}

.chat-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

/* Chat Textarea */
.chat-textarea {
    flex: 1;
    resize: none;
    border: 2px solid #e5e7eb;
    border-radius: 22px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 46px;
    max-height: 150px;
    transition: border-color 0.3s ease;
    direction: rtl;
}

.chat-textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Send Button */
.send-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

/* Character Counter */
.char-counter {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.375rem;
    text-align: left;
}

.char-counter.text-danger {
    color: #dc2626 !important;
    font-weight: 600;
}

/* Quick Questions */
.quick-questions {
    margin-bottom: 1.25rem;
}

.quick-question {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.quick-question:hover {
    background: #f0fdf4;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* Statistics Cards */
.chat-stats .card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.chat-stats .card:hover {
    transform: translateY(-3px);
}

.chat-stats .card-body {
    padding: 1.25rem;
}

.chat-stats h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.chat-stats .text-muted {
    font-size: 0.875rem;
}

/* Clear Chat Button */
.clear-chat-btn {
    border: 2px dashed #e5e7eb;
    background: white;
    transition: all 0.3s ease;
}

.clear-chat-btn:hover {
    border-color: #dc2626;
    background: #fef2f2;
    color: #dc2626;
}

/* Scope Badge */
.scope-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.375rem 0.875rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Tips Section */
.tips-section .list-group-item {
    border-left: 3px solid #10b981;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
}

/* Responsive Adjustments for Chat */
@media (max-width: 991.98px) {
    .chat-container {
        height: 500px;
    }

    .message-bubble {
        max-width: 320px;
    }

    .quick-questions {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .quick-questions::-webkit-scrollbar {
        height: 4px;
    }
}

@media (max-width: 575.98px) {
    .chat-container {
        height: 450px;
        border-radius: 10px;
    }

    .message-bubble {
        max-width: 260px;
    }

    .chat-messages {
        padding: 1rem;
    }

    .message {
        margin-bottom: 1rem;
    }

    .chat-stats h3 {
        font-size: 1.5rem;
    }
}

/* ============================================
   PHASE 5: DRAFTING STUDIO STYLES
   ============================================ */

/* Purple button variant */
.btn-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.bg-purple {
    background-color: #8b5cf6 !important;
}

.text-purple {
    color: #8b5cf6 !important;
}

/* Drafting form card */
.drafting-form-card {
    /* position: sticky; */
    top: 20px;
}

/* Draft editor */
.draft-editor {
    width: 100%;
    min-height: 600px;
    padding: 2rem;
    border: none;
    font-family: 'Traditional Arabic', 'Arial', sans-serif;
    font-size: 1rem;
    line-height: 2;
    direction: rtl;
    text-align: right;
    resize: vertical;
    background: #fafafa;
}

.draft-editor:focus {
    outline: none;
    background: white;
}

/* Draft display card */
.draft-display-card {
    min-height: 500px;
}

.draft-display-card .card-body {
    background: #fafafa;
}

/* Draft history items */
.draft-history-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.draft-history-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #8b5cf6;
}

.draft-history-item .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

/* Responsive adjustments for Drafting Studio */
@media (max-width: 991.98px) {
    .drafting-form-card {
        position: static;
    }

    .draft-editor {
        min-height: 400px;
        padding: 1rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   PHASE 6: CONSULTATION SIMULATOR STYLES
   ============================================ */

/* Warning/Amber button and theme */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.bg-warning {
    background-color: #f59e0b !important;
}

.text-warning {
    color: #f59e0b !important;
}

/* Consultation form card */
.consultation-form-card {
    /* position: sticky; */
    top: 20px;
}

/* Opinion display */
.opinion-display-card {
    min-height: 500px;
}

.opinion-text {
    font-family: 'Traditional Arabic', 'Arial', sans-serif;
    font-size: 1rem;
    line-height: 2;
    direction: rtl;
    text-align: right;
    color: #1f2937;
}

.opinion-text h5 {
    color: #f59e0b;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #fef3c7;
}

.opinion-text strong {
    color: #92400e;
    font-weight: 600;
}

/* Consultation history items */
.consultation-history-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.consultation-history-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #f59e0b;
}

/* Responsive adjustments for Consultation */
@media (max-width: 991.98px) {
    .consultation-form-card {
        position: static;
    }

    .opinion-text {
        font-size: 0.95rem;
        line-height: 1.8;
    }
}
