@import url('https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Fraunces:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Primary Colors */
    --muted-rose: #D05A67;     /* Main brand color */
    --deep-slate-blue: #2A3F5F; /* Support and structure */
    --warm-amber: #FDBE3B;     /* Highlighting/attention */
    --deep-teal: #006D77;      /* Active states */
    --reseda-green: #688B58;   /* Completion and success */
    --cinnabar: #E74C3C;       /* Warnings and errors */
    --onyx: #343A40;           /* Text color */
    --seasalt-white: #F8F9FA;  /* Background */
    
    /* Secondary Colors */
    --celadon: #AFE3C0;
    --pistachio: #90C290;
    
    /* Typography Scale - Golden Ratio 1:1.618 */
    --font-size-xxxl: 68px;
    --font-size-xxl: 42px;
    --font-size-xl: 26px;
    --font-size-m: 16px;
    --font-size-s: 10px;
    
    /* Spacing (based on golden ratio) */
    --spacing-xs: 6px;
    --spacing-s: 10px;
    --spacing-m: 16px;
    --spacing-l: 26px;
    --spacing-xl: 42px;
    --spacing-xxl: 68px;
}

/* Base Typography */
body {
    font-family: 'Work Sans', sans-serif;
    font-size: var(--font-size-m);
    line-height: 1.618;
    color: var(--onyx);
    background-color: var(--seasalt-white);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    margin-top: 1.618em;
    margin-bottom: 0.618em;
    line-height: 1.2;
}

h1 {
    font-size: var(--font-size-xxl);
    color: var(--muted-rose);
}

h2 {
    font-size: var(--font-size-xl);
    color: var(--muted-rose);
}

h3 {
    font-size: var(--font-size-m);
    font-weight: 600;
    color: var(--muted-rose);
}

/* Status tags (inline) */
.status-tag-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.2;
}

.status-tag-inline .icon {
    margin-right: 0;
}

/* Links */
a {
    color: var(--deep-teal);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 0 var(--spacing-m); */ /* Commented out - Bulma provides container padding */
}

/* Forms */
input, textarea, select {
    font-family: 'Work Sans', sans-serif;
    font-size: var(--font-size-m);
    padding: var(--spacing-s);
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Removed width: 100% to allow inline elements like checkboxes to size naturally */
}

/* Specific override for textareas and selects if they should remain full width */
textarea, select {
    width: 100%;
}

/* Ensure text inputs are block or inline-block if needed */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="file"] {
    width: 100%;
    display: block; /* Or inline-block if preferred */
}


label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-s) var(--spacing-m);
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    font-size: var(--font-size-m);
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--muted-rose);
    color: var(--seasalt-white);
}

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

.btn-secondary {
    background-color: var(--deep-slate-blue);
    color: var(--seasalt-white);
}

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

.btn-highlight {
    background-color: var(--warm-amber);
    color: var(--onyx);
}

.btn-highlight:hover {
    background-color: #eaad32;
}

/* Card */
/* Commented out - Relying on Bulma's card styles now
.card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: var(--spacing-m);
    margin-bottom: var(--spacing-m);
}
*/

.card-header {
    margin-top: 0;
    margin-bottom: var(--spacing-m);
    border-bottom: 1px solid #eee;
    padding-bottom: var(--spacing-s);
}

/* Data elements */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Inter', sans-serif;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.data-table th {
    font-weight: 500;
    text-align: left;
    padding: var(--spacing-m) var(--spacing-l);
    background-color: var(--seasalt-white);
    color: var(--onyx);
    font-size: var(--font-size-m);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #E9ECEF;
}

.data-table td {
    padding: var(--spacing-m) var(--spacing-l);
    border-bottom: 1px solid #E9ECEF;
    font-size: var(--font-size-m);
    color: var(--onyx);
}

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

.data-table tr:hover {
    background-color: var(--seasalt-white);
    transition: background-color 0.2s ease;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-s);
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge-draft {
    background-color: var(--warm-amber);
    color: var(--onyx);
}

.status-badge-active {
    background-color: var(--reseda-green);
    color: var(--seasalt-white);
}

.status-badge-archived {
    background-color: var(--deep-slate-blue);
    color: var(--seasalt-white);
}

/* Filter buttons */
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    min-width: 120px;
    font-size: var(--font-size-m);
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    font-family: 'Work Sans', sans-serif;
    border: 1px solid transparent;
    white-space: nowrap;
}

.filter-button-active {
    background-color: var(--muted-rose);
    color: var(--seasalt-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-button-active:hover {
    background-color: #bb4e59;
    text-decoration: none;
}

.filter-button-inactive {
    background-color: var(--seasalt-white);
    color: var(--onyx);
    border-color: #E9ECEF;
}

.filter-button-inactive:hover {
    background-color: #E9ECEF;
    text-decoration: none;
    border-color: #DEE2E6;
}

/* Action links */
.action-link {
    color: var(--deep-teal);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.action-link:hover {
    color: #005a63;
    text-decoration: none;
}

.action-link-primary {
    color: var(--muted-rose);
}

.action-link-primary:hover {
    color: #bb4e59;
}

/* Alert messages */
.alert {
    padding: var(--spacing-m);
    border-radius: 4px;
    margin-bottom: var(--spacing-m);
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--cinnabar);
    color: var(--cinnabar);
}

.alert-success {
    background-color: rgba(104, 139, 88, 0.1);
    border-left: 4px solid var(--reseda-green);
    color: var(--reseda-green);
}

.alert-info {
    background-color: rgba(0, 109, 119, 0.1);
    border-left: 4px solid var(--deep-teal);
    color: var(--deep-teal);
}

/* Fallback styles in case components don't load */
textarea {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Work Sans', sans-serif;
    font-size: var(--font-size-m);
    margin-bottom: var(--spacing-m);
}

button[type="submit"] {
    background-color: var(--muted-rose);
    color: var(--seasalt-white);
    padding: var(--spacing-s) var(--spacing-m);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

button[type="submit"]:hover {
    background-color: #bb4e59;
}

/* Key activities list styling */
.key-activities {
    list-style-type: none;
    padding-left: 0;
}

.key-activities li {
    margin: 5px 0;
    padding-left: 20px;
    position: relative;
}

.key-activities li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--onyx);
}

.alignment-score {
    font-weight: bold;
    color: var(--deep-teal);
}

/* Feedback form styling */
.feedback-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.rating-container {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0;
    gap: var(--spacing-s);
}

.feedback-textarea {
    height: 80px;
    width: 100%;
}

.model-info {
    font-size: 0.8em;
    color: #666;
    margin-top: 10px;
}

.feedback-submitted {
    background-color: rgba(104, 139, 88, 0.1);
    border-left: 4px solid var(--reseda-green);
    color: var(--reseda-green);
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
}

/* Header and Navigation */
.site-header {
    background-color: var(--muted-rose) !important;
    padding: var(--spacing-m) 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--seasalt-white);
    font-weight: 600;
    font-size: var(--font-size-xl);
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: var(--spacing-m);
}

.main-nav a {
    color: var(--seasalt-white);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-s);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.main-nav a:hover {
    background-color: rgba(255,255,255,0.1);
    text-decoration: none;
}

/* Footer styling */
.site-footer {
    background-color: var(--onyx);
    color: var(--seasalt-white);
    padding: var(--spacing-m) 0;
    margin-top: var(--spacing-xxl);
    text-align: center;
}

/* Tool Card Styles */
.tool-card {
    @apply transition-all duration-200;
}

.tool-card:hover {
    @apply transform translate-y-[-2px];
}

.tool-status-badge {
    @apply inline-block text-xs font-medium rounded-full px-2 py-1;
}

.tool-status-complete {
    @apply bg-[#D1FAE5] text-[#065F46];
}

.tool-status-progress {
    @apply bg-[#DBEAFE] text-[#1E40AF];
}

.tool-status-notstarted {
    @apply bg-[#F3F4F6] text-[#4B5563];
}

/* Filter Buttons */
.filter-btn {
    @apply px-3 py-1 text-xs rounded-full bg-[#F3F4F6] text-[#4B5563] transition-colors;
}

.filter-btn:hover {
    @apply bg-[#E5E7EB];
}

.filter-btn-active {
    @apply bg-[#006D77] text-white;
}

/* HTMX Indicator */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}
.htmx-request .htmx-indicator {
    opacity: 1;
}
.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Checkbox List Item Alignment */
.checkbox-list-item {
    margin-bottom: var(--spacing-s); /* Keep existing margin */
}

.checkbox-list-item > div { /* Target the wrapper div */
    display: flex;
    align-items: flex-start; /* Align items to the top */
}

.checkbox-list-item input[type="checkbox"] {
    margin-right: var(--spacing-s); /* Space between checkbox and label */
    flex-shrink: 0; /* Prevent checkbox from shrinking */
    margin-top: 0.2em; /* Small adjustment to align checkbox visually with text */
    /* Reset width if it was globally set */
    width: auto; 
}

.checkbox-list-item label {
    margin-bottom: 0; /* Override default label margin */
    /* Ensure label takes remaining space if needed, though not strictly necessary with flex-start */
}

/* Survey Detail Info List Styling */
.survey-info dl {
    margin-top: var(--spacing-s); /* Add some space above the list */
    padding: var(--spacing-m);
    background-color: #fff; /* White background */
    border-radius: 4px; /* Match card radius */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Match card shadow */
}

.survey-info dt {
    font-weight: 600; /* Bold terms */
    color: var(--deep-slate-blue); /* Use a supporting colour */
    margin-top: var(--spacing-s); /* Space above each term */
}

.survey-info dt:first-of-type {
    margin-top: 0; /* No margin above the first term */
}

.survey-info dd {
    margin-left: 0; /* Remove default indentation */
    margin-bottom: var(--spacing-s); /* Space below each definition */
    color: var(--onyx); /* Standard text colour */
}

/* Bulma Overrides - Phase 1 (Navbar) */

/* Override the background color of the main navbar */
.navbar.navbar-main {
    --bulma-navbar-background-color: var(--muted-rose); /* Tell Bulma's variable system to use our color */
    background-color: var(--muted-rose); /* Also set it directly */
    /* Additional overrides for text color, hover states, etc. will be kept */
}

/* Override the text color for links within the main navbar */
.navbar.navbar-main .navbar-item,
.navbar.navbar-main .navbar-link {
    color: var(--seasalt-white); /* White text for contrast */
}

/* Override hover/focus states for links within the main navbar */
.navbar.navbar-main .navbar-item:hover,
.navbar.navbar-main .navbar-item:focus,
.navbar.navbar-main .navbar-link:hover,
.navbar.navbar-main .navbar-link:focus {
    background-color: rgba(255, 255, 255, 0.1); /* Slight white highlight on hover */
    color: var(--seasalt-white); /* Ensure text remains white */
}

/* Override the active state background color for links within the main navbar */
.navbar.navbar-main .navbar-item.is-active,
.navbar.navbar-main .navbar-link.is-active {
    background-color: rgba(255, 255, 255, 0.2); /* Slightly stronger highlight for active */
    color: var(--seasalt-white);
}

/* Override the color of the navbar burger icon */
.navbar.navbar-main .navbar-burger {
    color: var(--seasalt-white);
}

/* Ensure the brand text (if styled separately) also uses the correct color */
.navbar.navbar-main .navbar-brand .navbar-item .has-text-white {
    color: var(--seasalt-white) !important; /* Use !important if necessary to override Bulma utility */
}

/* Bulma Overrides - Dashboard Cards */

/* Style links within card titles to use the design system link color */
.card .card-content .title a {
    color: var(--deep-teal);
}

/* Optional: Define hover state if needed */
.card .card-content .title a:hover {
    /* color: var(--some-hover-color); */ /* Uncomment and set if a specific hover color is desired */
    text-decoration: underline; /* Keep Bulma's default underline on hover for links */
}

/* Ensure cards within columns stretch to the same height */
.column .card {
    height: 100%;
    /* Optional: If content needs aligning, make card a flex container too */
    /* display: flex; */
    /* flex-direction: column; */
}

/* Optional: If card-content needs to grow */
/* .column .card .card-content {
    flex-grow: 1;
} */

/* Add custom styles at the end or in appropriate sections */

/* Increase Navbar Height */
.navbar-item {
    padding-top: 1rem; 
    padding-bottom: 1rem;
}

/* Increase Logo Max Height within Navbar */
.navbar-brand .navbar-item img {
    max-height: 2.5rem; /* Adjust as needed */
}
