﻿/* ===========================================
   Law Page Styles - Based on AI Page Design
   =========================================== */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo.ttf') format('truetype');
}



body {
    font-family: 'Cairo', sans-serif;
    background-color: lightgrey !important;
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
}

/* ===========================================
   Main Container & Glass Card
   =========================================== */

.main-container {
    position: relative;
    z-index: 10;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    width: 100%;
    max-width: 1200px;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

    .glass-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    }

/* ===========================================
   Title Section
   =========================================== */

.title-section {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.ai-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.main-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subtitle {
    color: #4a5568;
    font-size: 18px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ===========================================
   Form Section
   =========================================== */

.form-section {
    position: relative;
}

.input-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #2d3748;
    font-size: 18px;
    padding: 1.5rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    resize: vertical;
    /*min-height: 75px;*/
    width: 100%;
}

    .form-control::placeholder {
        color: #a0aec0;
        font-weight: 400;
    }

    .form-control:focus {
        outline: none;
        border-color: #667eea;
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

/* ===========================================
   Search Options
   =========================================== */

.search-options {
    margin-bottom: 2rem;
}

.options-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    text-align: right;
}

.radio-options {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    min-width: 250px;
    justify-content: flex-start;
}

    .radio-item:hover {
        background: rgba(102, 126, 234, 0.05);
    }

    .radio-item.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.radio-input {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.radio-label {
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    margin-right: 0.5rem;
}

/* ===========================================
   Search Type Options
   =========================================== */

.search-type-options {
    padding: 1.25rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.search-type-title {
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.75rem;
    text-align: right;
}

.search-type-radio {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-type-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
    padding: 0.75rem 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 40px;
}

    .search-type-item:hover {
        background: rgba(102, 126, 234, 0.05);
    }

.search-type-input {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
    cursor: pointer;
}

    .search-type-input + span {
        font-size: 15px;
        color: #4a5568;
        cursor: pointer;
        font-weight: 500;
        white-space: nowrap;
        text-align: center;
        line-height: 1.2;
    }

/* ===========================================
   Button Container
   =========================================== */

.btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-send {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 20px;
    font-weight: 600;
    padding: 1rem 2.5rem;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    display: inline-block;
}

    .btn-send:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
        color: white;
        text-decoration: none;
    }

    .btn-send:active {
        transform: translateY(-1px);
    }

.loading-container {
    text-align: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.loading-text {
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
}

/* ===========================================
   Results Section
   =========================================== */

.results-section {
    margin-top: 2rem;
    padding: 0 2rem;
    position: relative;
    font-size:14px;
}

.results-anchor {
    position: absolute;
    top: -100px;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.law-results {
    display: flex;
    gap: 1rem;
    min-height: 600px;
}

.menu-toggle-container {
    width: 3%;
    display: flex;
    align-items: flex-start;
    padding-top: 1rem;
}

.menu-toggle-btn {
    border: 1px solid #2d3748;
    border-radius: 4px;
    background: white;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .menu-toggle-btn:hover {
        background: #f7fafc;
        transform: scale(1.05);
    }

/* ===========================================
   Side Menu
   =========================================== */

.side-menu {
    width: 0;
    overflow: hidden;
    transition: width 1s ease-in-out;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .side-menu.in {
        width: 22%;
    }

.menu-content {
    padding: 1rem;
    height: 100%;
}

.portlet {
    border: none;
    background: transparent;
}

.portlet-body {
    padding: 0;
}

.scroll-box {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

/* TreeView Styles */
.treeNode {
    font-size: 14px;
    color: #4a5568;
    padding: 0.25rem 0;
}

.SelectedNode {
    background-color: #667eea !important;
    color: white !important;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

.leafNode {
    color: #2d3748;
}

/* ===========================================
   Main Content Area
   =========================================== */

.main-content {
    width: 97%;
    transition: width 1s ease-in-out;
    overflow: hidden;
}

    .main-content.in {
        width: 75%;
    }

.content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    min-height: 600px;
}

.article-container {
    height: 100%;
}

.article-content {
    padding: 0;
}

/* ===========================================
   Login Section
   =========================================== */

.login-section {
    text-align: center;
    padding: 3rem 1rem;
}

.login-message {
    margin-bottom: 2rem;
}

.login-label {
    font-size: 18px;
    font-weight: 600;
    color: #dc3545;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ===========================================
   Data Section
   =========================================== */

.data-section {
    padding: 1rem 0;
}

.law-title {
    text-align: center;
    margin-bottom: 1rem;
}

.law-title-label {
    font-size: 18px;
    font-weight: 700;
    color: #074a7e;
}

.law-status {
    text-align: center;
    margin-bottom: 1rem;
}

.law-status-label {
    font-size: 16px;
    font-weight: 600;
    color: #dc3545;
}

/* ===========================================
   Articles Section
   =========================================== */

.articles-scroll {
    max-height: 487px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.article-item {
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.article-tabs {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tab-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    background: #2d3748;
}

.tab-item {
    flex: 1;
    min-width: 120px;
}

    .tab-item a,
    .tab-item .aspNetDisabled {
        display: block;
        padding: 0.75rem 1rem;
        color: white;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        text-align: center;
        transition: all 0.3s ease;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .tab-item:last-child a {
        border-right: none;
    }

    .tab-item a:hover,
    .tab-item .aspNetDisabled:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
        text-decoration: none;
    }

    .tab-item.active a {
        background: var(--primary-gradient);
        color: white;
    }
.tc-table.table-primary.table > thead > tr > th, .tc-table.table-primary.table > thead > tr > td {
        background: var(--primary-gradient)!important;
        color: white!important;

}

    .tab-icon {
    margin-left: 0.5rem;
    font-size: 12px;
}

.tab-content {
    padding: 1.5rem;
}

/* ===========================================
   Article Content
   =========================================== */

.article-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.article-name {
    font-size: 20px;
    font-weight: 700;
    color: #1e40af;
}

.copy-button-container {
    text-align: left;
    margin-bottom: 1rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #1e40af;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .copy-btn:hover {
        background: rgba(30, 64, 175, 0.1);
        color: #1e40af;
        text-decoration: none;
    }

    .copy-btn i {
        margin-left: 0.25rem;
    }

.article-text {
    color: #2d3748;
    text-align: justify;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-note {
    color: #dc2626;
    text-align: justify;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-weight: 500;
}

.process-section,
.cases-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.process-title,
.cases-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1rem;
}

.process-content,
.cases-content {
    color: #2d3748;
    text-align: justify;
    font-size: 15px;
    line-height: 1.8;
}

.mzkra-content {
    color: #059669;
    text-align: justify;
    font-size: 18px;
    line-height: 1.8;
}

/* ===========================================
   Pagination
   =========================================== */

.pagination-container {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
}

.loading-progress {
    text-align: center;
    padding: 2rem;
}

/* ===========================================
   Items Results
   =========================================== */

.items-results {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

/* ===========================================
   Modal Improvements
   =========================================== */

.modal-dialog.modal-lg {
    width: 90%;
    max-width: 1200px;
}

.modal-dialog.modal-md {
    width: 60%;
    max-width: 800px;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ===========================================
   Responsive Design
   =========================================== */

@media (max-width: 1200px) {
    .radio-options {
        flex-direction: column;
    }

    .radio-item {
        min-width: unset;
    }

    .search-type-radio {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .search-type-item {
        justify-content: flex-start;
    }
}

@media (max-width: 992px) {
    .law-results {
        flex-direction: column;
    }

    .menu-toggle-container {
        width: 100%;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .side-menu,
    .side-menu.in {
        width: 100%;
        margin-bottom: 1rem;
    }

    .main-content,
    .main-content.in {
        width: 100%;
    }

    .tab-nav {
        font-size: 12px;
    }

    .tab-item a {
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }

    .glass-card {
        padding: 2rem 1.5rem;
    }

    .main-title {
        font-size: 20px;
    }

    .subtitle {
        font-size: 16px;
    }

    .form-control {
        font-size: 16px;
        padding: 1rem;
    }

    .btn-send {
        width: 100%;
        font-size: 18px;
    }

    .radio-options {
        padding: 1rem;
        flex-direction: column;
    }

    .radio-item {
        min-width: unset;
    }

    .radio-label {
        font-size: 14px;
    }

    .search-type-radio {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-type-item {
        justify-content: flex-start;
        width: 100%;
    }

    .article-text,
    .article-note,
    .process-content,
    .cases-content,
    .mzkra-content {
        font-size: 16px;
    }

    .article-name {
        font-size: 18px;
    }

    .tab-nav {
        flex-direction: column;
    }

    .tab-item {
        min-width: unset;
    }

    .results-section {
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    .main-container {
        padding: 0.5rem;
    }

    .glass-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .form-control {
        min-height: 100px;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .article-item {
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .tab-content {
        padding: 1rem;
    }

    .process-section,
    .cases-section {
        padding: 1rem;
        margin-top: 1rem;
    }

    .search-type-radio {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .search-type-item {
        justify-content: flex-start;
        width: 100%;
        padding: 0.75rem;
    }

    .search-type-input + span {
        font-size: 14px;
    }
}

/* ===========================================
   Animation & Transitions
   =========================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.article-item {
    animation: fadeInUp 0.5s ease-out;
}

.radio-item {
    animation: slideIn 0.3s ease-out;
}

.glass-card {
    animation: fadeInUp 0.6s ease-out;
}

/* ===========================================
   Scrollbar Styling
   =========================================== */

.articles-scroll::-webkit-scrollbar,
.scroll-box::-webkit-scrollbar {
    width: 8px;
}

.articles-scroll::-webkit-scrollbar-track,
.scroll-box::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.articles-scroll::-webkit-scrollbar-thumb,
.scroll-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background 0.3s ease;
}

    .articles-scroll::-webkit-scrollbar-thumb:hover,
    .scroll-box::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* ===========================================
   Utility Classes
   =========================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.bg-white {
    background-color: white;
}

.shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rounded {
    border-radius: 8px;
}

.border {
    border: 1px solid #e2e8f0;
}

/* ===========================================
   Print Styles
   =========================================== */

@media print {
    .main-container,
    .btn-container,
    .menu-toggle-container,
    .side-menu,
    .loading-progress {
        display: none !important;
    }

    .main-content {
        width: 100% !important;
    }

    .article-item {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .glass-card {
        box-shadow: none;
        background: white;
    }
}
/* Add smooth scroll behavior to the page */
html {
    scroll-behavior: smooth;
}

/* Enhanced results section visibility */
.results-section {
    scroll-margin-top: 100px; /* Space from top when scrolled to */
}

/* Improved results anchor positioning */
.results-anchor {
    position: absolute;
    top: -120px; /* Adjusted for better positioning */
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Enhanced loading animation */
.loading-container {
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Smooth transitions for panel visibility */
.law-results, .items-results {
    opacity: 0;
    animation: fadeInResults 0.5s ease-out forwards;
}

@keyframes fadeInResults {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content {
    font-size:14px!important;
}