/* alphabetlearning/static/css/project.css */

@charset "UTF-8";
/* ... (keep all the existing Bootstrap variable and utility class definitions) ... */

/* --- START: Custom Project Styles --- */

.my-card-text {
  color: #444444;
  font-size: 0.9rem;
}

/* Existing color classes for legacy/manual use */
.category_colour_efl { color: cyan; }
.category_colour_literacy { color: green; }
.category_colour_maths { color: magenta; }
.category_colour_eymaths { color: #343aeb; }
.category_colour_eyliteracy { color: #ebde34; }
.category_colour_alphabet { color: black; }


/* Update resource-category-badge to use background/color directly if set in model */
.resource-category-badge {
  font-size: 0.85em;
  padding: 0.4em 0.7em;
  min-width: 120px;
  text-align: center;
  display: inline-block;
  border-radius: 0.25rem;
  // Now using direct color styling via inline styles in templates
  // Legacy color classes kept for backward compatibility (optional, could be removed if not used elsewhere)
}
// Adding specific background/color for legacy category classes if they were used
.resource-category-badge.category_colour_literacy { background-color: green; color: white; }
.resource-category-badge.category_colour_maths { background-color: magenta; color: white; }
.resource-category-badge.category_colour_eymaths { background-color: #343aeb; color: white; }
.resource-category-badge.category_colour_eyliteracy { background-color: #ebde34; color: black; }
.resource-category-badge.category_colour_alphabet { background-color: #f8f9fa; color: black; border: 1px solid #dee2e6; }


/* Resource details styling */
.resource-details {
  margin-bottom: 1.5rem;

  .row {
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-gray-200);

    &:last-child {
      border-bottom: none;
    }
  }

  .badge {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4em 0.7em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
    display: inline-block;

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

    &.subcategory-badge {
      min-width: 100px; // Slightly smaller width for subcategories
    }
  }
}

/* Roboto font classes (assuming these are intentional for specific elements) */
.roboto-thin { font-family: "Roboto", sans-serif; font-weight: 100; font-style: normal; }
.roboto-light { font-family: "Roboto", sans-serif; font-weight: 300; font-style: normal; }
.roboto-regular { font-family: "Roboto", sans-serif; font-weight: 400; font-style: normal; }
.roboto-medium { font-family: "Roboto", sans-serif; font-weight: 500; font-style: normal; }
.roboto-bold { font-family: "Roboto", sans-serif; font-weight: 700; font-style: normal; }
.roboto-black { font-family: "Roboto", sans-serif; font-weight: 900; font-style: normal; }
.roboto-thin-italic { font-family: "Roboto", sans-serif; font-weight: 100; font-style: italic; }
.roboto-light-italic { font-family: "Roboto", sans-serif; font-weight: 300; font-style: italic; }
.roboto-regular-italic { font-family: "Roboto", sans-serif; font-weight: 400; font-style: italic; }
.roboto-medium-italic { font-family: "Roboto", sans-serif; font-weight: 500; font-style: italic; }
.roboto-bold-italic { font-family: "Roboto", sans-serif; font-weight: 700; font-style: italic; }
.roboto-black-italic { font-family: "Roboto", sans-serif; font-weight: 900; font-style: italic; }


/* Global body font (assuming this is the desired default) */
body {
    font-family: "Roboto", sans-serif;
}

/* Heading font weights (already standard Bootstrap, keeping for clarity) */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700; /* Bold for headings */
}

/* Hr opacity (already overridden, keeping as is) */
hr { opacity: 1 !important; }

/* Standard text font weight (already standard Bootstrap, keeping for clarity) */
p, label, button {
    font-weight: 400; /* Regular for body text */
}


/* --- INPUT STYLING FIX --- */
/* Revert global input styling to be closer to Bootstrap defaults */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"],
select,
textarea {
    display: block; /* Ensure block display for form-control */
    width: 100%; /* Ensure full width for form-control */
    padding: 0.375rem 0.75rem; /* Standard Bootstrap padding */
    font-size: 1rem; /* Standard Bootstrap font size */
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color); /* Standard Bootstrap border */
    appearance: none;
    border-radius: var(--bs-border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    outline: none; /* Remove default outline */
}

/* Add specific styling back to the home page sign-up input using its class */
.sign-up-form-input {
    /* Apply the aggressive styling here */
    border: 6px solid rgb(253, 119, 119); /* Outer border */
    border-radius: 8px; /* Slightly rounded corners */
    font-size: 1.8rem; /* Adjusted font size for better proportions */
    padding: 12px; /* Slightly larger padding for a clean look */
}

/* Focus state specifically for the sign-up input */
.sign-up-form-input:focus {
    border-color: rgb(253, 80, 80); /* Slightly darker red border */
    box-shadow: 0 0 5px rgba(253, 80, 80, 0.8); /* Add a subtle red glow */
    /* Optional: add standard bootstrap focus shadow as well */
    /* box-shadow: var(--bs-box-shadow-inset), 0 0 0 var(--bs-focus-ring-width) var(--bs-focus-ring-color), 0 0 5px rgba(253, 80, 80, 0.8); */
}

/* Placeholder styling for the sign-up input */
.sign-up-form-input::placeholder {
    color: #bbb; /* Light gray */
    font-style: italic; /* Subtle italics for differentiation */
}

/* --- END: INPUT STYLING FIX --- */


.custom-text {
    font-family: "Roboto", sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
    color: #212529;
}

.email-submit-button {
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    background-color: #ff9d3e;
    border: 2px solid #ff9d3e;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.download-button {
  padding: 6px;
  background-color: #aa4ec4;
  color: white;
  border-radius: 3px;
}


.download-button:hover {
  color: pink;
}

.email-submit-button:hover {
    background-color: #fa8713;
}

/* Alert styles (already defined by Bootstrap, keeping for clarity if custom needed) */
/* .alert { ... } */
/* .alert-primary { ... } */
/* etc. */
.alert-debug {
    color: black;
    background-color: white;
    border-color: #d6e9c6;
}

.alert-error {
    color: #b94a48;
    background-color: #f2dede;
    border-color: #eed3d7;
}

.rotated-image {
    transform: rotate(0deg);
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.rotated-image:hover {
    transform: rotate(3deg) translateY(-5px);
}

/* Navbar styling */
.navbar-links { margin-left: auto; }
.navbar-links .nav-item { margin-left: 1rem; }
.navbar-links .nav-link {
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.25rem;
    transition: color 0.3s;
}
.navbar-links .nav-link::after {
    content: ''; position: absolute; width: 0; height: 3px; bottom: 0; left: 0;
    background: linear-gradient(90deg, #0d6efd, #6f42c1, #d63384);
    transition: width 0.3s ease;
}
.navbar-links .nav-link:hover::after { width: 100%; }


/* Category sidebar styling */
.category-link {
    color: #6c757d; font-size: 1rem; position: relative; transition: all 0.3s;
    text-decoration: none; padding-left: 0.5rem; padding-right: 0.5rem;
    border-radius: 0.25rem;
}
.category-link::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
    background: linear-gradient(90deg, #0d6efd, #6f42c1, #d63384);
    transition: width 0.3s ease;
}
.category-link:hover { color: #495057; }
.category-link:hover::after { width: 100%; }
.category-link.active {
    font-weight: bold; color: #0a58ca; letter-spacing: 0.01em;
}
.category-link.active::after { width: 100%; height: 3px; }


/* Spinner overlay styles */
.spinner-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); z-index: 1000; justify-content: center; align-items: center;
}
.spinner {
    border: 6px solid #f3f3f3; border-top: 6px solid #3498db; border-radius: 50%;
    width: 50px; height: 50px; animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}

/* /1* PDF snapshot styling *1/ */
/* .pdf-snapshot-container { */
/*   gap: 0.5rem; */
/*   background-color: var(--bs-gray-100); */
/*   padding: 1rem; */
/*   border-radius: var(--bs-border-radius); */
/* } */
/* .pdf-snapshot-container .snapshot-item img { */
/*   max-height: 250px; */
/*   width: auto; */
/*   border: 5px solid var(--bs-gray-300); */
/*   box-shadow: var(--bs-box-shadow-sm); */
/*   background-color: var(--bs-white); */
/* } */

/* Price tag styles (already defined, keeping as is) */
/* .price-tag { ... } */
/* .price-tag--free { ... } */
/* .price-tag--paid { ... } */


/* Resource Card Styling for List Page */
.resource-card .card-body {
    display: flex;
    flex-direction: column;
}
.resource-card .card-title a {
    font-size: 1.2rem;
    text-decoration: none; // Ensure resource card titles are not underlined
}
.resource-card .truncate {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; // Limit description to 3 lines
    -webkit-box-orient: vertical;
}

/* Basket Counter Responsive Styling */
.basket-counter {
    font-size: 0.75rem;
    min-width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: 600;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .basket-counter {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        margin-left: 0.75rem;
        font-size: 0.65rem;
        min-width: 1.1rem;
        height: 1.1rem;
        padding: 0;
        text-align: center;
    }
    
    /* Make basket link more compact on mobile */
    .navbar-nav .basket-link {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    /* Adjust navbar collapse spacing */
    .navbar-collapse .navbar-nav {
        align-items: flex-start;
    }
}

/* Extra small screens */
@media (max-width: 576px) {
    .basket-counter {
        font-size: 0.6rem;
        min-width: 1rem;
        height: 1rem;
        margin-left: 0.5rem;
        padding: 0;
        text-align: center;
    }
}
