﻿/* PinkRoccade Local Government Styling */
:root {
    --prlg-primary: #E6007E;
    --prlg-secondary: #00A0B0;
    --prlg-accent: #7B68EE;
    --prlg-success: #28A745;
    --prlg-warning: #FFC107;
    --prlg-danger: #DC3545;
    --prlg-light: #F8F9FA;
    --prlg-dark: #343A40;
    --prlg-gray: #6C757D;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--prlg-primary);
}

html {
  position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 80px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Layout Improvements */
.main-content {
    padding-top: 20px;
padding-bottom: 40px;
}

/* PinkRoccade Brand Colors - Solid Colors Only */
.bg-prlg-primary {
    background-color: var(--prlg-primary) !important;
}

.bg-prlg-secondary {
    background-color: var(--prlg-secondary) !important;
}

.text-prlg-primary {
    color: var(--prlg-primary) !important;
}

.text-prlg-secondary {
    color: var(--prlg-secondary) !important;
}

.text-prlg-accent {
    color: var(--prlg-accent) !important;
}

.text-prlg-success {
    color: var(--prlg-success) !important;
}

.btn-prlg-primary {
    background-color: var(--prlg-primary);
    border-color: var(--prlg-primary);
    color: white;
}

.btn-prlg-primary:hover {
    background-color: #c5006a;
    border-color: #c5006a;
    color: white;
}

.btn-prlg-secondary {
    background-color: var(--prlg-secondary);
    border-color: var(--prlg-secondary);
    color: white;
}

.btn-prlg-secondary:hover {
    background-color: #008a98;
    border-color: #008a98;
    color: white;
}

/* Header Styling */
.navbar {
    z-index: 1030;
}

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

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Card Styling */
.card {
    border: none;
 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

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

.card-header {
    background-color: var(--prlg-light);
    border-bottom: 2px solid var(--prlg-primary);
    font-weight: 600;
    color: var(--prlg-dark);
    padding: 0.75rem 1rem;
}

.card-body {
    padding: 1rem;
}

.project-header {
    background-color: var(--prlg-primary) !important;
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 0.75rem 1rem;
}

/* Compact Project Headers */
.project-header-compact {
    background-color: var(--prlg-primary) !important;
    color: white;
    border-radius: 8px 8px 0 0;
    padding: 0.5rem 0.75rem;
}

.project-header-compact h5 {
    font-size: 1rem;
}

/* Issue Item Styling */
.issue-item {
    border-left: 4px solid var(--prlg-secondary);
    background-color: white;
    transition: all 0.3s ease;
    margin-bottom: 0;
    padding: 0.75rem 1rem !important;
}

.issue-item:hover {
    border-left-color: var(--prlg-primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.issue-item h6 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.issue-item .btn-sm {
  padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.issue-item .d-grid {
    gap: 0.25rem;
}

.issue-status {
    display: inline-block;
 padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
text-transform: uppercase;
}

.status-todo {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.status-in-progress {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-done {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-backlog {
  background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d1d2d3;
}

.status-review {
 background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-testing {
    background-color: #fce4ec;
    color: #880e4f;
border: 1px solid #f8bbd9;
}

.issue-type {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.type-bug {
    background-color: #f8d7da;
    color: #721c24;
}

.type-feature {
    background-color: #d1ecf1;
    color: #0c5460;
}

.type-task {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Compact Issue Items */
.issue-item-compact {
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s ease;
}

.issue-item-compact:hover {
    background-color: rgba(230, 0, 126, 0.05);
}

.issue-item-compact:last-child {
    border-bottom: none !important;
}

/* Compact Issue Types */
.issue-type-compact {
    display: inline-block;
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 500;
 text-transform: uppercase;
    min-width: 40px;
    text-align: center;
}

/* Time Entry Form Styling */
.time-entry-form {
  background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed var(--prlg-secondary);
    padding: 1.5rem;
}

.time-input-section {
    background-color: #f8f9fa;
}

.time-display {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--prlg-primary);
}

/* Filter Panel */
.filter-panel {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    position: relative;
    z-index: 1060;
}

.filter-panel .card-header {
    padding: 0.75rem 1rem;
    background-color: var(--prlg-light);
    border-bottom: 2px solid var(--prlg-primary);
    font-weight: 600;
    color: var(--prlg-dark);
}

.filter-panel .card-body {
    padding: 0.5rem 1rem !important;
}

.filter-panel .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.filter-panel .mb-3 {
    margin-bottom: 0.75rem !important;
}

/* Compact Filters */
.compact-filters .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.125rem;
}

.compact-filters .row {
    margin-bottom: 0;
}

/* Compact Stats Overview */
.stats-overview {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.stats-overview .card-body {
    padding: 0.75rem 1rem;
}

.stats-overview .d-flex {
    gap: 0.5rem;
}

.stat-item {
    flex: 1;
    padding: 0.5rem 0.25rem;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    min-width: 120px;
}

.stat-item:last-child {
    border-right: none;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.1rem;
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--prlg-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  font-weight: 500;
    white-space: nowrap;
}

/* Force horizontal layout even if Bootstrap fails */
@media (min-width: 768px) {
    .stats-overview .d-flex {
      display: flex !important;
     flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .stat-item {
      flex: 1 1 25% !important;
        min-width: 0 !important;
    }
}

/* Stats Cards (Legacy - keeping for backward compatibility) */
.stats-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.stats-card .card-body {
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.stats-primary {
    background: linear-gradient(135deg, var(--prlg-primary), var(--prlg-accent));
}

.stats-secondary {
    background: linear-gradient(135deg, var(--prlg-secondary), var(--prlg-primary));
}

.stats-success {
    background: linear-gradient(135deg, var(--prlg-success), var(--prlg-secondary));
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: all 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--prlg-primary);
    box-shadow: 0 0 0 0.2rem rgba(230, 0, 126, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--prlg-dark);
    margin-bottom: 0.5rem;
}

.form-select {
    border-radius: 6px;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.btn-sm {
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

.btn-lg {
border-radius: 8px;
    padding: 0.75rem 1.5rem;
}

/* Extra Small Buttons */
.btn-xs {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    border-radius: 3px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
  justify-content: center;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    background-color: var(--prlg-primary) !important;
    color: white;
  border-bottom: none;
    padding: 1.5rem;
}

.modal-header h5 {
    font-weight: 600;
 margin: 0;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 2rem;
 background-color: white;
}

.modal-footer {
    background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
    padding: 1rem 2rem;
}

.modal-lg .modal-body {
    padding: 0;
}

/* Modal z-index overrides to ensure they appear above filter dropdowns */
.modal {
    z-index: 1080 !important;
}

.modal-backdrop {
    z-index: 1079 !important;
}

.modal.show {
    z-index: 1080 !important;
}

.modal-dialog {
    z-index: 1081 !important;
}

/* Ensure modal content is on top */
.modal-content {
    position: relative;
    z-index: 1082 !important;
}

/* Additional modal backdrop fix for multiple modals */
.modal-backdrop.show {
    z-index: 1079 !important;
}

/* Ensure any tooltips or popovers in modals are properly layered */
.modal .tooltip {
    z-index: 1083 !important;
}

.modal .popover {
    z-index: 1083 !important;
}

/* Filter dropdown z-index hierarchy (keep these lower than modals) */
.filter-panel {
    position: relative;
    z-index: 1060;
}

.filter-panel .dropdown {
    position: relative;
    z-index: 1070;
}

.filter-panel .dropdown-menu {
    z-index: 1071 !important;
}

/* Time Entries Table Styling */
.table {
  margin-bottom: 0;
}

.table th {
    background-color: var(--prlg-light);
    border-bottom: 2px solid var(--prlg-primary);
    font-weight: 600;
    color: var(--prlg-dark);
    padding: 1rem;
}

.table td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(230, 0, 126, 0.05);
}

/* Badge improvements */
.badge {
    font-weight: 500;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
}

/* Action buttons in table */
.btn-group-sm > .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--prlg-gray);
}

.empty-state i {
font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Overlay effect for disabled background */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Footer */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    line-height: 60px;
    padding: 0 1rem;
    background-color: var(--prlg-light);
    border-top: 1px solid #dee2e6;
}

/* Page Header */
.page-header {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.page-header h1 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 1.5rem;
}

.page-header small {
    font-size: 0.8rem;
    display: block;
    margin-top: 0.1rem;
}

.project-header-compact {
    background-color: var(--prlg-primary) !important;
    color: white;
  border-radius: 8px 8px 0 0;
    padding: 0.5rem 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card {
    margin-bottom: 0.75rem;
    }

    .page-header {
        padding: 0.75rem 1rem;
    }

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

    .page-header .d-flex {
        flex-direction: column;
    align-items: flex-start !important;
        gap: 0.75rem;
    }

    /* Compact layout mobile adjustments */
    .issue-item-compact .d-flex {
        flex-direction: column;
     align-items: flex-start !important;
        gap: 0.5rem;
    }

    .issue-item-compact .flex-grow-1 {
      width: 100%;
    }

    .issue-item-compact .time-logged,
    .issue-item-compact .action-buttons {
        align-self: flex-end;
    }

    .compact-filters .row {
        flex-direction: column;
    }

    .compact-filters .col-md-3 {
        margin-bottom: 0.5rem;
    }

    .issue-content a {
     font-size: 0.85rem;
    }

    .btn-group-vertical .btn {
      margin-bottom: 0.5rem;
    }

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

    .modal-body {
        padding: 1.5rem;
    }

    .modal-footer {
        padding: 1rem 1.5rem;
    }

    .table-responsive {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .page-header {
    padding: 1rem;
    }

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

    .card-body {
        padding: 1rem;
    }

    .stats-card .card-body {
     padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
    }

  .table th,
    .table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

  .stat-item {
        flex: 1 1 100% !important;
        min-width: auto !important;
 border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

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

    /* Login page mobile styles */
    .login-page-container {
        padding: 1rem 0;
    }

    .login-container {
        padding: 1.5rem 1rem;
        margin: 1rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    /* Filter dropdown specific mobile overrides */
    .filter-panel .dropdown-toggle {
  font-size: 0.8rem;
    }

    .filter-panel .form-check-label {
        font-size: 0.85rem;
    }

    .filter-panel .btn-link {
      font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }

    /* Ensure dropdowns are on top even on mobile */
    .filter-panel .dropdown-menu {
        z-index: 9999 !important;
    }
}

/* Ensure modals are always positioned properly and visible */
.modal.show .modal-dialog {
    transform: translate(0, 0) !important;
    position: relative;
    z-index: 1081 !important;
}

/* Handle modal fade transitions */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* Ensure modal body content is accessible */
.modal-body {
    position: relative;
    z-index: 1082;
}

.modal-header {
    position: relative;
    z-index: 1082;
}

.modal-footer {
    position: relative;
    z-index: 1082;
}

/* Additional safeguards for Bootstrap modal positioning */
body.modal-open {
    overflow: hidden;
}

.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Ensure any form elements in modals work properly */
.modal input,
.modal select,
.modal textarea,
.modal button {
    position: relative;
    z-index: 1083;
}

/* Handle dropdown menus inside modals if any */
.modal .dropdown-menu {
    z-index: 1084 !important;
}

/* Prevent filter dropdowns from interfering with modals */
.modal-open .filter-panel .dropdown-menu {
    display: none !important;
}

/* Additional mobile safeguards */
@media (max-width: 768px) {
    .modal-dialog {
    margin: 0.5rem;
        max-width: calc(100% - 1rem);
        z-index: 1081 !important;
    }

    .modal.show {
        display: flex !important;
        align-items: center;
        z-index: 1080 !important;
 }
}

/* Filter dropdown visual feedback for saved/applied filters */
.dropdown-toggle.has-selections {
    background-color: #e3f2fd !important;
    border-color: var(--prlg-primary) !important;
    color: var(--prlg-primary) !important;
    font-weight: 500;
}

.dropdown-toggle.has-selections:hover {
    background-color: #bbdefb !important;
 border-color: var(--prlg-primary) !important;
    color: var(--prlg-primary) !important;
}

.dropdown-toggle.has-selections:focus {
    background-color: #e3f2fd !important;
    border-color: var(--prlg-primary) !important;
    color: var(--prlg-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(230, 0, 126, 0.25) !important;
}

/* Default "All" state styling */
.dropdown-toggle.all-selected {
    background-color: white;
    border-color: #6c757d;
    color: #6c757d;
}

/* Loading state for filter buttons */
.dropdown-toggle.loading {
    opacity: 0.6;
    pointer-events: none;
}

.dropdown-toggle.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced checkbox styling in filter dropdowns */
.filter-panel .dropdown-menu .form-check-input:checked {
    background-color: var(--prlg-primary);
  border-color: var(--prlg-primary);
}

.filter-panel .dropdown-menu .form-check-input:focus {
    border-color: var(--prlg-primary);
    box-shadow: 0 0 0 0.2rem rgba(230, 0, 126, 0.25);
}

/* Highlight selected items in dropdowns */
.filter-panel .dropdown-menu .form-check-input:checked + .form-check-label {
    color: var(--prlg-primary);
    font-weight: 500;
}
