/* Custom styles for accessibility */
.focus-visible:focus {
    outline: 3px solid #FF7F50;
    outline-offset: 2px;
}

/* Skip to content link - only visible on focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000099;
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Sidebar styles */
.sidebar-item {
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    background-color: var(--tw-colors-menuHover);
}

.sidebar-item:hover svg {
    stroke: #000099;
    fill: none;
}

.sidebar-item.active {
    background-color: var(--tw-colors-menuActive);
    color: var(--tw-colors-menuActiveText);
    border-left: 3px solid #000099;
}

.sidebar-item.active svg {
    fill: #000099;
    stroke: #000099;
}

/* Secondary menu consistent text size */
.submenu-item {
    font-size: 14px;
}

/* Card styling */
.metric-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Chart styling */
.chart-container {
    height: 250px; /* Reduced height */
    width: 100%;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 40;
        transition: transform 0.3s ease;
        height: 100%;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 30;
    }
    
    .overlay.active {
        display: block;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* Add these CSS styles to your stylesheet */

/* Sub-menu styles */
.sub-menu-item {
  font-size: 13px;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  margin-left: 0.5rem;
  border-left: 1px dashed #e5e7eb;
  transition: all 0.2s ease;
}

.sub-menu-item:hover {
  background-color: #f3f4f6;
  border-left: 1px solid #000099;
}

.sub-menu-item.active {
  background-color: #f0f9ff;
  color: #000099;
  border-left: 1px solid #000099;
  font-weight: 500;
}

/* Sub-menu container */
.sub-menu-container {
  margin-left: 1.5rem;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Sub-menu toggle button */
.submenu-toggle.active {
  background-color: #f0f9ff;
  color: #000099;
}

/* Sub-menu icon colors */
.sub-menu-item svg {
  opacity: 0.7;
  transition: all 0.2s ease;
}

.sub-menu-item:hover svg {
  opacity: 1;
  stroke: #000099;
}

.sub-menu-item.active svg {
  opacity: 1;
  stroke: #000099;
  fill: rgba(0, 0, 153, 0.1);
}

/* Add this to your stylesheet to ensure proper display of Tamil text */

/* Import a Tamil font - you can use Google Fonts or a local font */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Tamil:wght@400;500;700&display=swap');

/* Tamil font class */
.font-tamil {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 15px; /* Slightly larger for better readability */
}

/* Additional styles for reduced button heights and other UI elements */
input[type="text"], 
input[type="search"],
input[type="email"],
input[type="password"] {
  height: 32px; /* Smaller input height */
}

.action-btn {
  height: 32px; /* Smaller button height */
  padding-top: 0.25rem; /* 4px */
  padding-bottom: 0.25rem; /* 4px */
}

/* Reduce padding in table cells */
.compact-table th,
.compact-table td {
  padding-top: 0.5rem; /* 8px */
  padding-bottom: 0.5rem; /* 8px */
}

/* Tighter pagination controls */
.pagination-sm button {
  min-width: 28px;
  height: 28px;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
}

.modern-ui {
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-family: var(--font-family);
}

/* Improved header styling */
.page-title {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #1f2937;
}

.page-subtitle {
  color: #6b7280;
  font-weight: 400;
}

/* Card styling for list items */
.list-card {
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.list-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

/* Table improvements */
.modern-table {
  border-spacing: 0;
  width: 100%;
}

.modern-table th {
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #6b7280;
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
}

.modern-table td {
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1f2937;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.modern-table tr:hover td {
  background-color: #f9fafb;
}

/* Tamil font improvements */
.font-tamil {
  font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
  letter-spacing: 0.015em;
}

/* Custom district code badge */
.district-code {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background-color: #dbeafe;
  color: #1e40af;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

/* Action buttons with hover effects */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  transition: all 0.15s ease;
}

.action-btn.edit:hover {
  background-color: #dbeafe;
  color: #2563eb;
}

.action-btn.delete:hover {
  background-color: #fee2e2;
  color: #dc2626;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  background-color: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.empty-state-description {
  color: #6b7280;
  max-width: 24rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

/* Improved pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  margin: 0 0.15rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.pagination-item.active {
  background-color: var(--primary-color, #000099);
  color: white;
  font-weight: 500;
}

.pagination-item:not(.active):hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

/* Animation styles for modal */

/* Modal backdrop animation */
.modal-backdrop-enter {
  opacity: 0;
}

.modal-backdrop-enter-active {
  opacity: 1;
  transition: opacity 200ms;
}

.modal-backdrop-exit {
  opacity: 1;
}

.modal-backdrop-exit-active {
  opacity: 0;
  transition: opacity 200ms;
}

/* Modal content animation */
.modal-content-enter {
  opacity: 0;
  transform: scale(0.95);
}

.modal-content-enter-active {
  opacity: 1;
  transform: scale(1);
  transition: opacity 200ms, transform 200ms;
}

.modal-content-exit {
  opacity: 1;
  transform: scale(1);
}

.modal-content-exit-active {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 200ms, transform 200ms;
}

/* Focused input effects */
.input-focus-ring {
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-focus-ring:focus {
  border-color: #000099;
  box-shadow: 0 0 0 3px rgba(0, 0, 153, 0.15);
  outline: none;
}

/* Error input states */
.input-error {
  border-color: #ef4444 !important;
}

.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Button animations */
.btn-primary {
  background-color: #000099;
  color: white;
  transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
}

.btn-primary:hover {
  background-color: #000077;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background-color: white;
  color: #374151;
  border: 1px solid #d1d5db;
  transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
}

.btn-secondary:hover {
  background-color: #f3f4f6;
}

.btn-secondary:active {
  transform: scale(0.98);
}



/* Custom styles for DAP listing page */

/* Animation for fade-in effect when showing advanced filters */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Custom scrollbar for table overflow */
.overflow-x-auto::-webkit-scrollbar {
  height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* Status badge styles */
.status-badge {
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.status-badge-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.status-badge-not-required {
  background-color: #f3f4f6;
  color: #1f2937;
}

.status-badge-issued {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge-rejected {
  background-color: #fee2e2;
  color: #b91c1c;
}

.status-badge-expired {
  background-color: #ffedd5;
  color: #9a3412;
}

/* Improved hover effects for action buttons */
.hover-action-button {
  transition: all 0.2s ease;
}

.hover-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Card view improvements */
.dap-card {
  transition: all 0.2s ease;
}

.dap-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Custom select dropdown styling */
select.custom-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Responsive improvements */
@media (max-width: 640px) {
  .filters-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .action-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
  
  .action-button {
    flex: 1;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  .print-full-width {
    width: 100% !important;
  }
  
  body {
    font-size: 12pt;
  }
  
  table {
    border-collapse: collapse;
    width: 100%;
  }
  
  th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
  }
}


/* Custom styles for accessibility */
.focus-visible:focus {
    outline: 3px solid #FF7F50;
    outline-offset: 2px;
}
/* Skip to content link - only visible on focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2D5DA1;
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}
/* High contrast mode overrides */
@media (forced-colors: active) {
    .btn-primary {
        border: 2px solid transparent;
    }
}
/* Form styling */
.form-input:focus {
    border-color: #2D5DA1;
    box-shadow: 0 0 0 3px rgba(45, 93, 161, 0.2);
}
/* Image overlay gradient */
.image-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0.1) 100%);
}
.star-rating {
    display: flex;
    gap: 6px;
    align-items: center;
}

.star {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #e5e7eb;
}

.star:hover,
.star.hovered {
    color: #fbbf24;
}

.star.active {
    color: #f59e0b;
}

.rating-text {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 80px;
}

.character-counter {
    font-size: 0.75rem;
    color: #9ca3af;
}

.character-counter.warning {
    color: #f59e0b;
}

.character-counter.danger {
    color: #ef4444;
}

.success-checkmark {
    animation: checkmark 0.6s ease-in-out;
}

@keyframes checkmark {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}