/* Base Styles */
:root {
  --primary-color: #4e73df;
  --success-color: #1cc88a;
  --info-color: #36b9cc;
  --warning-color: #f6c23e;
  --danger-color: #e74a3b;
  --secondary-color: #858796;
  --light-color: #f8f9fc;
  --dark-color: #5a5c69;
  --text-color: #5a5c69;
}

/* Layout Styles */
body {
  background-color: #f8f9fc;
  color: var(--text-color);
}

/* Card Styles */
.card {
  border: none;
  border-radius: 0.35rem;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
  padding: 1rem 1.35rem;
}

/* Table Styles */
.table {
  margin-bottom: 0;
}

.table th {
  border-top: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #4e73df;
  background-color: #f8f9fc;
}

/* Badge Styles */
.badge {
  font-size: 0.9em;
  padding: 5px 8px;
  margin: 2px;
  display: inline-block;
  font-weight: 500;
}

.badge-success { background-color: var(--success-color); color: white; }
.badge-warning { background-color: var(--warning-color); color: #212529; }
.badge-danger { background-color: var(--danger-color); color: white; }
.badge-secondary { background-color: var(--secondary-color); color: white; }
.badge-dark { background-color: #343a40; color: white; }
.badge-red { background-color: #4f0711; color: white; }
.badge-info { background-color: var(--info-color); color: white; }
.badge-orange { background-color: #fd7e14; color: white; }
.badge-purple { background-color: #6f42c1; color: white; }
.badge-flexi { background-color: #20c997; color: white; }

/* Status badges container */
.status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

/* Sunday row highlighting */
tr.sunday-row {
  background-color: #fff5f5 !important;
  border-left: 4px solid #dc3545 !important;
}

tr.sunday-row:hover {
  background-color: #ffecec !important;
}

tr.sunday-row:hover td {
  color: #212529 !important;
}

tr.sunday-row td:first-child {
  font-weight: bold !important;
  color: #dc3545 !important;
}

/* Form Styles */
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
}

.form-control, .form-select {
  border: 1px solid #d1d3e2;
  border-radius: 0.35rem;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: #bac8f3;
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Button Styles */
.btn {
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: 0.35rem;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #2e59d9;
  border-color: #2653d4;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .status-badges {
      flex-direction: column;
      align-items: flex-start;
  }
  
  .badge {
      font-size: 0.8em;
      padding: 3px 6px;
  }
  
  .table-responsive {
      border: none;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
    width: 100%;
}

.alert {
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    animation: slideIn 0.3s forwards;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    padding: 0.5rem 0.5rem;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    opacity: 0.5;
    transition: opacity 0.15s ease-in-out;
}

.alert-dismissible .btn-close:hover {
    opacity: 1;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Form Specific Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fc;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 450px;
    margin: 2rem 0;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-header h2 {
    color: var(--text-color);
    font-size: 1.4rem;
    font-weight: normal;
}

.logo-container {
    text-align: center;
    margin: 1.5rem 0;
}

.login-logo {
    max-width: 200px;
    height: auto;
}

.login-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
    outline: 0;
}

.form-notes {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.submit-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.35rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background-color: #2e59d9;
}

.text-red {
  color: #dc3545; /* Red color for holiday text */
}

/* Optional: Add a small icon before public holiday text */
[class*="fa-calendar"]:before {
  margin-right: 4px;
}

.table-holiday{
  --bs-table-color:#000;
  --bs-table-bg:#fff3cd;
  --bs-table-border-color:#e6dbb9;
  --bs-table-striped-bg:#f2e7c3;
  --bs-table-striped-color:#000;
  --bs-table-active-bg:#e6dbb9;
  --bs-table-active-color:#000;
  --bs-table-hover-bg:#ece1be;
  --bs-table-hover-color:#000;
  color:var(--bs-table-color);
  border-color:var(--bs-table-border-color)}

.table-sunday{
  --bs-table-color:#000;
  --bs-table-bg:#ffcbd8;
  --bs-table-border-color:#b98096;
  --bs-table-striped-bg:#ff9191;
  --bs-table-striped-color:#000;
  --bs-table-active-bg:#ff94c1;
  --bs-table-active-color:#000;
  --bs-table-hover-bg:#ff858500;
  --bs-table-hover-color:#000;
  color:var(--bs-table-color);
  border-color:var(--bs-table-border-color)}

/* Responsive adjustments */
@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.2rem;
    }

    .table-responsive {
      max-height: 70vh;
      overflow-y: auto;
  }
  .table th {
      position: sticky;
      top: 0;
      background: white;
      z-index: 10;
  }

    /* Version Badge Styling */
  .footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #f8f9fa !important;
    border-top: 1px solid #e9ecef;
    z-index: 1030;
  }

  .version-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.5;
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  }

  /* Adjust main content padding to prevent footer overlap */
  body {
    padding-bottom: 60px; /* Height of the footer */
  }

  /* For pages with scrollable content */
  .container-fluid {
    padding-bottom: 80px; /* Extra space for the footer */
  }

}