/* Web Application CSS for LawApp */

/* CSS Variables for Web Theme */
:root {
    --web-primary: #1a1a1a;
    --web-secondary: #d4af37;
    --web-accent: #ff6b35;
    --web-success: #28a745;
    --web-warning: #ffc107;
    --web-danger: #dc3545;
    --web-light: #f8f9fa;
    --web-dark: #343a40;
    --web-gray: #6c757d;
    --web-border: #dee2e6;
    --web-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --web-radius: 8px;
    --web-transition: all 0.3s ease;
    --sidebar-width: 280px;
    --header-height: 70px;
}

/* Web App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--web-light);
    overflow: hidden;
}

/* Web Header */
.web-header {
    background: white;
    border-bottom: 1px solid var(--web-border);
    box-shadow: var(--web-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--web-gray);
    font-size: 18px;
    padding: 8px;
    border-radius: var(--web-radius);
    cursor: pointer;
    transition: var(--web-transition);
    display: none;
}

.sidebar-toggle:hover {
    background: var(--web-light);
    color: var(--web-primary);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    color: var(--web-primary);
}

.logo i {
    color: var(--web-secondary);
    font-size: 28px;
}

.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 24px;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--web-border);
    border-radius: var(--web-radius);
    font-size: 14px;
    background: var(--web-light);
    transition: var(--web-transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--web-secondary);
    background: white;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--web-gray);
    font-size: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-btn {
    background: none;
    border: none;
    color: var(--web-gray);
    font-size: 18px;
    padding: 8px;
    border-radius: var(--web-radius);
    cursor: pointer;
    position: relative;
    transition: var(--web-transition);
}

.header-btn:hover {
    background: var(--web-light);
    color: var(--web-primary);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--web-accent);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: var(--web-radius);
    cursor: pointer;
    transition: var(--web-transition);
}

.user-menu-btn:hover {
    background: var(--web-light);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--web-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--web-border);
    border-radius: var(--web-radius);
    box-shadow: var(--web-shadow);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--web-transition);
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--web-primary);
    text-decoration: none;
    transition: var(--web-transition);
}

.user-dropdown a:hover {
    background: var(--web-light);
}

.dropdown-divider {
    height: 1px;
    background: var(--web-border);
    margin: 8px 0;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: white;
    border-right: 1px solid var(--web-border);
    overflow-y: auto;
    z-index: 900;
    transition: var(--web-transition);
}

.sidebar-content {
    padding: 24px 0;
}

.sidebar-header {
    padding: 0 24px 16px;
    border-bottom: 1px solid var(--web-border);
    margin-bottom: 16px;
}

.sidebar-header h3 {
    margin: 0;
    color: var(--web-primary);
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 0 16px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--web-gray);
    text-decoration: none;
    border-radius: var(--web-radius);
    transition: var(--web-transition);
    margin-bottom: 4px;
}

.sidebar-nav-item:hover {
    background: var(--web-light);
    color: var(--web-primary);
}

.sidebar-nav-item.active {
    background: var(--web-secondary);
    color: white;
}

.sidebar-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-nav-item span {
    font-weight: 500;
}

/* Restricted Navigation Items */
.sidebar-nav-item.restricted {
    position: relative;
    opacity: 0.6;
    cursor: not-allowed;
}

.sidebar-nav-item.restricted:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--web-accent);
}

.sidebar-nav-item .restriction-lock {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--web-accent);
}

/* Premium Feature Content Styles */
.premium-feature-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.premium-feature-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.premium-feature-card {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--web-border);
}

.premium-icon {
    margin-bottom: 24px;
}

.premium-icon i {
    font-size: 4rem;
    color: var(--web-secondary);
    opacity: 0.8;
}

.premium-feature-card h2 {
    color: var(--web-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.premium-description {
    margin-bottom: 32px;
}

.premium-description p {
    color: var(--web-gray);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

.premium-features-list {
    text-align: left;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--web-light);
    border-radius: 12px;
    border: 1px solid var(--web-border);
}

.premium-features-list h4 {
    color: var(--web-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.premium-features-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.premium-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--web-dark);
    font-size: 0.95rem;
}

.premium-features-list li i {
    color: var(--web-success);
    font-size: 0.9rem;
}

.premium-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.premium-upgrade-btn {
    background: linear-gradient(135deg, var(--web-secondary), #b8941f);
    border: none;
    color: white;
    font-weight: 600;
    padding: 16px 32px;
    font-size: 1.1rem;
    transition: var(--web-transition);
}

.premium-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

.premium-note {
    padding-top: 16px;
    border-top: 1px solid var(--web-border);
}

.premium-note p {
    color: var(--web-gray);
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.premium-note i {
    color: var(--web-secondary);
}

/* Responsive Design for Premium Feature */
@media (max-width: 768px) {
    .premium-feature-card {
        padding: 32px 24px;
        margin: 0 16px;
    }
    
    .premium-icon i {
        font-size: 3rem;
    }
    
    .premium-feature-card h2 {
        font-size: 1.5rem;
    }
    
    .premium-actions {
        gap: 16px;
    }
    
    .premium-upgrade-btn {
        padding: 14px 24px;
        font-size: 1rem;
    }
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 24px;
    overflow-y: auto;
    background: var(--web-light);
    min-height: calc(100vh - var(--header-height));
}

/* Web Cards */
.web-card {
    background: white;
    border-radius: var(--web-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--web-shadow);
    border: 1px solid var(--web-border);
}

.web-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.web-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--web-primary);
    margin: 0;
}

.web-card-subtitle {
    font-size: 14px;
    color: var(--web-gray);
    margin: 4px 0 0 0;
}

/* Web Buttons */
.web-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--web-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--web-transition);
    text-decoration: none;
    text-align: center;
    justify-content: center;
}

.web-btn-primary {
    background: var(--web-secondary);
    color: white;
}

.web-btn-primary:hover {
    background: #b8941f;
    transform: translateY(-1px);
}

.web-btn-secondary {
    background: var(--web-light);
    color: var(--web-primary);
    border: 1px solid var(--web-border);
}

.web-btn-secondary:hover {
    background: #e9ecef;
}

.web-btn-danger {
    background: var(--web-danger);
    color: white;
}

.web-btn-success {
    background: var(--web-success);
    color: white;
}

.web-btn-warning {
    background: var(--web-warning);
    color: var(--web-dark);
}

.web-btn-block {
    width: 100%;
}

.web-btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.web-btn-lg {
    padding: 16px 24px;
    font-size: 16px;
}

/* Web Forms */
.web-form {
    background: white;
    border-radius: var(--web-radius);
    padding: 24px;
    box-shadow: var(--web-shadow);
}

.web-form-group {
    margin-bottom: 20px;
}

.web-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--web-primary);
}

.web-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--web-border);
    border-radius: var(--web-radius);
    font-size: 14px;
    transition: var(--web-transition);
    box-sizing: border-box;
}

.web-form-input:focus {
    outline: none;
    border-color: var(--web-secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.web-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--web-border);
    border-radius: var(--web-radius);
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Web Grid */
.web-grid {
    display: grid;
    gap: 24px;
}

.web-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.web-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.web-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Web Lists */
.web-list {
    background: white;
    border-radius: var(--web-radius);
    overflow: hidden;
    box-shadow: var(--web-shadow);
}

.web-list-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--web-border);
    transition: var(--web-transition);
}

.web-list-item:last-child {
    border-bottom: none;
}

.web-list-item:hover {
    background: var(--web-light);
}

.web-list-item-icon {
    width: 40px;
    height: 40px;
    background: var(--web-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 16px;
}

.web-list-item-content {
    flex: 1;
}

.web-list-item-title {
    font-weight: 500;
    color: var(--web-primary);
    margin: 0 0 4px 0;
}

.web-list-item-subtitle {
    font-size: 14px;
    color: var(--web-gray);
    margin: 0;
}

/* Web Badges */
.web-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.web-badge-primary {
    background: var(--web-secondary);
    color: white;
}

.web-badge-success {
    background: var(--web-success);
    color: white;
}

.web-badge-warning {
    background: var(--web-warning);
    color: var(--web-dark);
}

.web-badge-danger {
    background: var(--web-danger);
    color: white;
}

/* Web Loading */
.web-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--web-gray);
}

.web-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--web-border);
    border-top: 2px solid var(--web-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Web Toast */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    right: 20px;
    z-index: 3000;
    max-width: 400px;
}

.web-toast {
    background: white;
    border-radius: var(--web-radius);
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: var(--web-shadow);
    border-left: 4px solid var(--web-secondary);
    animation: slideIn 0.3s ease;
}

.web-toast.success {
    border-left-color: var(--web-success);
}

.web-toast.error {
    border-left-color: var(--web-danger);
}

.web-toast.warning {
    border-left-color: var(--web-warning);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Web Modal */
.web-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.web-modal-content {
    background: white;
    border-radius: var(--web-radius);
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.web-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.web-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--web-primary);
    margin: 0;
}

.web-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--web-gray);
    cursor: pointer;
    padding: 4px;
}

/* Web Empty State */
.web-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--web-gray);
}

.web-empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.web-empty-state h3 {
    margin: 0 0 12px 0;
    color: var(--web-primary);
    font-size: 20px;
}

.web-empty-state p {
    margin: 0;
    font-size: 16px;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 800;
    opacity: 0;
    visibility: hidden;
    transition: var(--web-transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-center {
        max-width: 400px;
        margin: 0 16px;
    }
    
    .web-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header-center {
        display: none;
    }
    
    .web-grid-3,
    .web-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .web-modal-content {
        margin: 20px;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 16px;
    }
    
    .web-grid-2,
    .web-grid-3,
    .web-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .web-card {
        padding: 16px;
    }
    
    .web-form {
        padding: 16px;
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    margin-bottom: 24px;
}

.loading-logo i {
    font-size: 48px;
    color: var(--web-secondary);
    margin-bottom: 16px;
}

.loading-logo h2 {
    font-size: 32px;
    color: var(--web-primary);
    margin: 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--web-border);
    border-top: 3px solid var(--web-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-content p {
    color: var(--web-gray);
    font-size: 16px;
    margin: 0;
}

/* Blog ticker */
#blog-widget .ticker {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  padding: 4px 0;
}
#blog-widget .ticker .items {
  display: inline-block;
  will-change: transform;
}
#blog-widget .ticker.animate .items {
  animation: blog-scroll 20s linear infinite;
}
#blog-widget .ticker:hover .items {
  animation-play-state: paused;
}
#blog-widget .ticker-chip {
  display: inline-block;
  margin-right: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
}

@keyframes blog-scroll {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}

/* Blog ticker wrapper */
.wp-ticker {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 10px 8px;
  border: 1px solid #eef2f6;
}

/* The moving line */
.wp-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  will-change: transform;
}

/* Start/stop animation by toggling .animate on .wp-ticker */
.wp-ticker.animate .wp-ticker-track {
  animation: wp-ticker-marquee 28s linear infinite;
}

@keyframes wp-ticker-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* track is duplicated, -50% loops seamlessly */
}

/* Pause on hover */
.wp-ticker:hover .wp-ticker-track {
  animation-play-state: paused;
}

/* Chip style links */
.wp-chip {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: #f5f7fb;
  border: 1px solid #e7ecf3;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  font-size: 15px;
  line-height: 1;
  color: #1b5cab;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.wp-chip:hover {
  background: #eef5ff;
  border-color: #d7e6ff;
  transform: translateY(-1px);
}

.wp-chip:active {
  transform: translateY(0);
}