@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

/* UI Guide Variables (subset for demonstration, ideally these are in :root) */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --bs-body-bg: #f8f9fa; 
    --bs-body-color: #212529;
    --bs-border-color: #dee2e6;
    --bs-card-bg: #fff;
    /* For box-shadow on focus, assuming --primary-color-rgb is available or defined based on --primary-color */
    /* E.g., if --primary-color is #0d6efd, then --primary-color-rgb would be 13, 110, 253 */
    --primary-color-rgb: 13, 110, 253; 
}

[data-bs-theme="dark"] {
    --primary-color: #3d8bfd;   
    --bs-body-bg: #212529;      
    --bs-body-color: #f8f9fa;   
    --bs-border-color: #495057; 
    --bs-card-bg: #343a40;      
    --primary-color-rgb: 61, 139, 253; /* Lighter blue for dark mode focus */
}

/* General body styling */
body {
    font-family: 'Inter', sans-serif; /* Primary font from UI Guide */
    line-height: 1.6;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
}

/* Page Title Styling */
.page-title {
    font-family: 'Inter', sans-serif; /* Primary font */
    font-weight: 700; /* Bold */
    font-size: 2.5rem; /* 40px */
    color: var(--bs-body-color); /* Primary Text color */
    margin-bottom: 1.5rem; /* Medium spacing */
    text-transform: none; 
}

/* Card styling from UI Guide */
.card {
    background: var(--bs-card-bg); /* Use card background variable */
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--bs-border-color); /* Adjusted to use theme border color */
    margin-bottom: 1.5rem; /* Added for spacing between elements */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: transparent; /* Make card header transparent to use card's bg */
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem; /* Adjust padding to align with card's 1.5rem */
    margin: -1.5rem -1.5rem 1rem -1.5rem; /* Offset padding of card to make header full width */
    border-radius: 16px 16px 0 0; /* Match card border radius */
}

.card-header .page-title {
    margin-bottom: 0; /* Remove bottom margin for page title if it's in a card-header */
}

/* Form Elements from UI Guide */
.form-control,
.form-select {
    font-family: 'Inter', sans-serif;
    border-radius: 4px;
    border: 1px solid var(--bs-border-color);
    padding: 0.5rem 1rem;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: var(--bs-card-bg); /* Ensure inputs match card/body bg */
    color: var(--bs-body-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color-rgb), 0.25);
}

.input-group-text {
    background-color: var(--bs-body-bg); /* Match other form elements */
    border: 1px solid var(--bs-border-color);
    color: var(--secondary-color);
    border-radius: 4px 0 0 4px; /* Adjust if on right */
}

/* Ensure datalist dropdown matches theme */
datalist {
  color: var(--bs-body-color);
  background-color: var(--bs-card-bg);
}
option {
  background-color: var(--bs-card-bg);
  color: var(--bs-body-color);
}

/* Primary Button from UI Guide */
.btn-primary {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 4px;
    padding: 0.5rem 1.5rem;
    font-weight: 600; /* Semibold, as per common button practice */
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Determine hover bg/border color based on theme vars if needed */
}

/* Table styling refinements for view-feedback.html */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 1.5rem;
    border: 1px solid var(--bs-border-color);
}

.table thead th {
    font-family: 'Inter', sans-serif;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    background: #367cf5;
    text-align: left;
    white-space: nowrap;
    border-bottom: none;
}

.table thead th:first-child {
    border-top-left-radius: 12px;
}

.table thead th:last-child {
    border-top-right-radius: 12px;
}

.table tbody td {
    font-family: 'Inter', sans-serif;
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid var(--bs-border-color);
    text-align: left;
    font-size: 0.9rem;
    color: var(--bs-body-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.feedback-row {
    transition: all 0.2s ease;
}

.feedback-row:hover {
    background-color: rgba(var(--primary-color-rgb), 0.07) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 50rem;
}

.badge.bg-success {
    background-color: rgba(40, 167, 69, 0.2) !important;
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.badge.bg-secondary {
    background-color: rgba(108, 117, 125, 0.15) !important;
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Modal refinements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
    padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h6 {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-footer {
    border-top: 1px solid rgba(var(--bs-body-color-rgb), 0.1);
    padding: 1.25rem 1.5rem;
}

/* For the comments background in modal */
.bg-light {
    background-color: rgba(var(--bs-body-color-rgb), 0.05) !important;
}

/* Form switch (toggle) styling */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Navbar shadow (existing, ensure it fits with UI guide if main-header has different bg) */
.main-header {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Softer shadow from UI guide for navbar */
    position: sticky; /* From UI Guide */
    top: 0;
    z-index: 1030; 
    background-color: var(--bs-body-bg); /* From UI Guide */
    /* backdrop-filter: blur(10px); /* From UI Guide - can be performance intensive */
    /* -webkit-backdrop-filter: blur(10px); */
    border-bottom: 1px solid var(--bs-border-color); /* From UI Guide - using theme border */
    transition: background-color 0.3s, box-shadow 0.3s; /* From UI Guide */
}

/* Ensure container has some top margin if navbar is sticky */
.container.mt-4 {
    padding-top: 1rem; 
}

/* Custom Feedback Messages */
#feedbackSuccessMessage {
    color: #28a745; /* Green for success - from UI Guide */
    background-color: rgba(40, 167, 69, 0.1); /* Light green background from UI Guide badge-success */
    border: 1px solid rgba(40, 167, 69, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 4px; /* Match button/input border-radius */
    text-align: center;
    font-weight: 500;
}

#feedbackErrorMessage {
    color: #dc3545; /* Red for danger - from UI Guide */
    background-color: rgba(220, 53, 69, 0.1); /* Light red background from UI Guide badge-danger */
    border: 1px solid rgba(220, 53, 69, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
} 