/* =========================================================
   MENU
   	00. Variables & Base
   	01. Typography
   	02. Layout
   	03. Header
   	04. Navigation
   	05. Footer
   	06. Cards
   	07. Forms & Buttons
        07A. Inputs & Labels
        07B. Buttons
        07C. Form Layouts
        07D. Checkboxes & Class UI
        07E. Action Buttons
   	08. Alerts & Badges
   	09. Tables
   	10. Results & Exports
   	11. Auth / Login
   	12. Titles & Awards
   	13. Cookie Consent
   	14. Classes & Competition Entry
	15. Mobile
	16. My horses
	17. Result exporter
	18. Results
	19. Results list
	20. My horses
   ========================================================= */


/* =========================================================
   00. VARIABLES & BASE
   ========================================================= */

:root {
    --green: #2f5d50;
    --light-green: #3d7a69;
    --dark-sand: #AD905A;
    --cream: #f5f1e8;
    --white: #ffffff;
    --gray: #666;
    --border: #ddd;
    --danger: #a33;
    --success-bg: #e5f6ea;
    --success-text: #2d7a46;
    --error-bg: #ffe5e5;
    --error-text: #a00;
    --card-shadow: 0 6px 18px rgba(0,0,0,0.08);
}


/* =========================================================
   01. TYPOGRAPHY
   ========================================================= */

@media (max-width: 480px) {
    .welcome-card h2,
    .auth-card h2 {
        font-size: 20px;
    }

    .welcome-card p,
    .welcome-card li {
        font-size: 14px;
    }
}


/* =========================================================
   02. LAYOUT
   ========================================================= */




/* =========================================================
   03. HEADER
   ========================================================= */

@media (max-width: 850px) {
    .header {
        padding: 8px 12px 0;
    }

    .header-inner {
        align-items: flex-start;
    }

    .logo {
        height: 105px;
    }

    .title-text {
        margin-left: 105px;
    }

    .header h1 {
        max-width: 250px;
        font-size: 16px;
    }

    .header h2 {
        max-width: 250px;
        font-size: 12px;
    }

    .header-image {
        height: 180px;
    }

    .header-over-hero {
        padding-bottom: 8px;
    }

    .header-over-hero .logo {
        height: 95px;
    }

    .adaptive-header {
        height: 320px;
    }
}

@media (max-width: 700px) {
    .adaptive-header {
        height: 190px;
    }

    .adaptive-header-content {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}


/* =========================================================
   04. NAVIGATION
   ========================================================= */

@media (max-width: 850px) {
    .hamburger {
        display: block;
        position: relative;
        z-index: 200;
    }

    .nav-wrap {
        display: none;
        position: absolute;
        top: 58px;
        right: 10px;
        z-index: 150;
        width: min(280px, calc(100vw - 20px));
        padding: 12px;
        border-radius: 10px;
        background: var(--green);
        box-shadow: 0 8px 18px rgba(0,0,0,0.22);
    }

    .nav-wrap.open {
        display: block;
    }

    .header-over-hero .nav-wrap {
        top: 58px;
        background: rgba(47, 93, 80, 0.96);
    }

    .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav a,
    .nav-dropdown-toggle {
        display: block;
        width: 100%;
        padding: 5px;
        border-radius: 6px;
        text-align: left;
        text-transform: uppercase;
    }

    .nav a:hover,
    .nav-dropdown-toggle:hover {
        background: var(--light-green);
    }

    .nav-dropdown-menu {
        position: static;
        min-width: 0;
        margin: 0 0 6px 10px;
        padding: 4px;
        border-radius: 6px;
        background: rgba(0,0,0,0.12);
        box-shadow: none;
    }

    .nav-dropdown-menu a {
        padding: 4px 10px;
        text-transform: uppercase;
    }

    .lang-switch {
        margin-top: 10px;
        padding-left: 10px;
    }
}


/* =========================================================
   05. FOOTER
   ========================================================= */

@media (max-width: 700px) {
    .site-footer-inner {
        display: block;
    }

    .footer-links {
        margin-top: 12px;
    }
}


/* =========================================================
   06. CARDS
   ========================================================= */

@media (max-width: 480px) {
    .welcome-card,
    .auth-card {
        padding: 16px;
        border-radius: 8px;
    }
}


/* =========================================================
   07. FORMS & BUTTONS
   ========================================================= */


/* =========================================================
   07A. INPUTS & LABELS
   ========================================================= */

@media (max-width: 700px) {
    input,
    textarea {
        font-size: 16px;
    }

    textarea {
        min-height: 110px;
    }
}


/* =========================================================
   07B. BUTTONS
   ========================================================= */

@media (max-width: 700px) {
    button,
    .button-link {
        font-size: 16px;
    }
}


/* =========================================================
   07C. FORM LAYOUTS
   ========================================================= */

@media (max-width: 700px) {
    .form-grid,
    .export-grid,
    .export-template-grid,
    .export-filter-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   07D. CHECKBOXES & CLASS UI
   ========================================================= */

@media (max-width: 700px) {
    .class-checkbox-list {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   07E. ACTION BUTTONS
   ========================================================= */




/* =========================================================
   08. ALERTS & BADGES
   ========================================================= */




/* =========================================================
   09. TABLES
   ========================================================= */

@media (max-width: 700px) {
    .translation-summary {
        grid-template-columns: 1fr;
    }

    .translation-table th,
    .translation-table td {
        min-width: 180px;
        white-space: normal;
    }

    .translation-table textarea {
        min-height: 90px;
        font-size: 16px;
    }

    .translation-key {
        white-space: normal;
        word-break: break-word;
    }
}


/* =========================================================
   10. RESULTS & EXPORTS
   ========================================================= */

@media (max-width: 800px) {
    .export-row {
        display: block;
        padding: 10px 0;
    }

    .export-row span {
        display: block;
    }
}


/* =========================================================
   11. AUTH / LOGIN
   ========================================================= */

@media (max-width: 800px) {
    .auth-layout {
        flex-direction: column;
        align-items: center;
        min-height: auto;
        padding: 14px;
    }

    .welcome-card,
    .auth-card {
        max-width: 100%;
    }

    .welcome-card {
        order: 1;
    }

    .auth-card {
        order: 2;
    }
}


/* =========================================================
   12. TITLES & AWARDS
   ========================================================= */




/* =========================================================
   13. COOKIE CONSENT
   ========================================================= */

@media (max-width: 700px) {
    .cookie-consent {
        display: block;
    }

    .cookie-consent-actions {
        flex-direction: column;
        margin-top: 12px;
    }
}


/* =========================================================
   14. CLASSES & COMPETITION ENTRY
   ========================================================= */

@media (max-width: 800px) {
    .class-entry-grid {
        grid-template-columns: 1fr;
    }

    .class-entry-card {
        padding: 12px;
    }

    .class-entry-card h3 {
        font-size: 1.2rem;
    }

    .existing-horse-list {
        max-height: 320px;
    }

    .horse-option {
        gap: 10px;
        padding: 10px;
    }

    .horse-option input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .horse-option-top {
        gap: 6px;
    }

    .horse-option-name {
        font-size: 0.95rem;
    }

    .horse-option-bottom {
        font-size: 0.88rem;
    }

    .horse-badge {
        padding: 3px 7px;
        font-size: 0.72rem;
    }

    .existing-horse-tools {
        gap: 6px;
    }

    .existing-horse-tools button {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}


/* =========================================================
   15. MOBILE
   ========================================================= */

/* General mobile-only rules can go here if they do not belong to a specific section. */


/* =========================================================
   16. MY HORSES
   ========================================================= */

@media (max-width: 800px) {
    .horse-edit .form-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   17. RESULTS EXPORTER
   ========================================================= */

@media (max-width: 700px) {
    .export-grid {
        grid-template-columns: 1fr;
    }

    .export-filter-grid {
        grid-template-columns: 1fr;
    }

    .export-actions {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 10px;
    }
}


/* =========================================================
   18. RESULTS
   ========================================================= */

@media (max-width: 1000px) {
    .results-level-grid {
        column-count: 1;
    }
}

@media (max-width: 700px) {
    .result-filter-panel {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   19. RESULTS LIST
   ========================================================= */

@media (max-width: 1000px) {
    .results-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .results-list-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   20. MY HORSES
   ========================================================= */

@media (max-width: 1000px) {
    .horse-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .horse-page-header,
    .horse-group-summary {
        display: block;
    }

    .horse-control-buttons {
        margin-top: 12px;
    }

    .horse-list-grid {
        grid-template-columns: 1fr;
    }
  
  	.horse-discipline-row,
    .horse-discipline-row-head {
        grid-template-columns: 1fr;
    }

    .horse-discipline-main-cell {
        justify-content: flex-start;
	}
}