/* Simple shaky animation for status labels */
.status-label-shake {
    animation: statusLabelShake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes statusLabelShake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
    100% { transform: none; }
}
/* Pulsing loading effect for status labels */
.status-label-loading {
    position: relative;
    overflow: hidden;
    background: #e9ecef;
}
.status-label-loading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #007bff 0%, #00c6ff 100%);
    opacity: 0.5;
    z-index: 1;
    animation: statusLabelCharge 1.2s linear forwards;
}
@keyframes statusLabelCharge {
    0% { width: 0%; }
    100% { width: 100%; }
}
/*
 * assets/css/style.css
 *
 * Custom Stylesheet for the RateMyDog App.
 * These rules will override or add to the base AdminLTE theme.
 */

/*
 * Retain the styles for our custom form elements,
 * as AdminLTE's default date picker styles can be inconsistent.
 */
.custom-date-input-container { 
    position: relative; 
    padding-top: 16px; 
}
.custom-date-input-container label { 
    position: absolute; 
    top: 0; 
    left: 0; 
    font-size: 0.85em; 
    color: rgba(0,0,0,0.6); 
}
.custom-date-input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-size: 1em; 
    font-family: inherit; 
    box-sizing: border-box; 
}

/*
 * Retain the styles for our Google Map canvas.
 */
#map-canvas { 
    height: 400px; 
    width: 100%; 
    border-radius: 8px; 
    border: 1px solid #ddd; 
    margin-top: 8px; 
}

/*
 * Retain our user message styles (success/error boxes).
 * We can customize these later to better match the AdminLTE theme if needed.
 */
.message { 
    padding: 1em; 
    margin-bottom: 1.5em; 
    border-radius: 5px; 
    border: 1px solid transparent; 
    font-weight: bold; 
}
.success { 
    background-color: #d4edda; 
    color: #155724; 
    border-color: #c3e6cb; 
}
.error { 
    background-color: #f8d7da; 
    color: #721c24; 
    border-color: #f5c6cb; 
}

/*
 * OBSOLETE STYLES REMOVED:
 * - .main-content, .main-content--wide (Handled by AdminLTE's .content-wrapper)
 * - All .mdc-* table styles (Will be replaced by DataTables styles)
 * - All responsive media queries for the old table (Will be replaced)
 */

/* Custom application styles */

@media (max-width: 767.98px) {
  .navbar-brand.h1 {
    white-space: normal;
    height: auto;
    line-height: 1.2;
    font-size: 1rem;
  }
}

/* Styles for inline-editable table cells */
.is-editable {
    background-color: #fef9e7 !important; /* A very light yellow to indicate editability */
    cursor: pointer !important;
}
.is-editable:hover {
    background-color: #fdf3d3 !important; /* A slightly darker yellow on hover */
}

/* The status cell should always have the editable look */
.status-cell {
    background-color: #fef9e7;
    cursor: pointer;
}
.status-cell:hover {
    background-color: #fdf3d3;
}

/* Custom Tooltip Style */
.tooltip-custom .tooltip-inner {
    background-color: #343a40; /* Dark background */
    color: #fff; /* White text */
    border-radius: .25rem;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.tooltip-custom .arrow::before {
    border-top-color: #343a40;
}

/* Style for highlighting tied rows in the results table */
.tie-highlight {
    background-color: #fff3cd !important; /* A light yellow color from Bootstrap's '.table-warning' */
}
.tie-highlight td {
    font-weight: bold;
    color: #664d03; /* A dark yellow/brown color for text */
}

/* Animation for status label change in branding manager */
.status-label-animate {
    animation: statusLabelFade 0.8s;
}
@keyframes statusLabelFade {
    0% {
        background-color: #ffeeba;
        color: #856404;
        box-shadow: 0 0 8px 2px #ffeeba;
    }
    100% {
        background-color: inherit;
        color: inherit;
        box-shadow: none;
    }
}

input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    accent-color: #007bff;
    vertical-align: middle;
    margin-right: 8px;
    position: relative;
    top: 5px;
}

/* Add spacing between action buttons in tournament list */
.tournament-actions .btn,
.tournament-actions button {
    margin-right: 4px;
    margin-bottom: 8px;
}
.tournament-actions .btn:last-child,
.tournament-actions button:last-child {
    margin-right: 0;
}

/* Sidebar Menu Tweaks to Prevent Bottom Overlapping */
.nav-sidebar .nav-link {
    padding: 0.45rem 0.75rem !important;
    line-height: 1.3 !important;
}
.nav-sidebar .nav-link p {
    margin: 0 !important;
    line-height: 1.3 !important;
}
.nav-sidebar .nav-header {
    padding: 0.45rem 0.75rem !important;
    margin-top: 0.35rem !important;
    margin-bottom: 0.15rem !important;
    line-height: 1.3 !important;
}
.sidebar > nav {
    padding-bottom: 30px !important;
}

/* Sticky translation action buttons bar */
.action-buttons-container {
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    background: var(--color-card, #F8FAFF) !important;
    padding: 1rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid var(--color-border, #E5E7EB);
    z-index: 100;
    box-shadow: 0 -8px 15px -5px rgba(0, 0, 0, 0.05);
}

/* Move DataTables search input to the left, length selector to the right, and increase dimensions (Supports both 1.x and 2.x) */
body .dataTables_wrapper .row:first-child,
body .dt-container .row.justify-content-between {
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 1rem !important;
}

/* Reset column alignments and margins for 1.x */
body .dataTables_wrapper .row:first-child > div {
    display: block !important;
    flex: 0 0 auto !important;
    max-width: 100% !important;
    width: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Reset column alignments and margins for 2.x */
body .dt-container .dt-layout-start {
    margin-left: auto !important;
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
}
body .dt-container .dt-layout-end {
    margin-left: 0 !important;
    margin-right: auto !important;
    display: flex !important;
    align-items: center !important;
}

/* Align contents */
body .dataTables_wrapper .dataTables_filter,
body .dt-container .dt-search {
    text-align: left !important;
    float: left !important;
}
body .dataTables_wrapper .dataTables_length,
body .dt-container .dt-length {
    text-align: right !important;
    float: right !important;
}

/* Style labels */
body .dataTables_wrapper .dataTables_filter label,
body .dt-container .dt-search label {
    margin-bottom: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
}

/* Scale and style search input fields (350px width, 40px height) */
body .dataTables_wrapper div.dataTables_filter input,
body .dataTables_wrapper div.dataTables_filter input[type="search"],
body .dt-container div.dt-search input,
body .dt-container div.dt-search input[type="search"] {
    width: 350px !important;
    height: 40px !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
    border: 1px solid var(--color-border, #E5E7EB) !important;
    box-sizing: border-box !important;
    display: inline-block !important;
}

/* Scale and style page length selectors */
body .dataTables_wrapper div.dataTables_length select,
body .dt-container div.dt-length select {
    height: 38px !important;
    border-radius: 6px !important;
    border: 1px solid var(--color-border, #E5E7EB) !important;
}

/* Staging/Local environment ribbon (top-left) */
.staging-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    width: 150px;
    background: #17a2b8;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    text-align: center;
    line-height: 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transform: rotate(-45deg) translate(-38px, -15px);
    z-index: 99999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

/* Freemium environment ribbon (top-right) */
.freemium-ribbon {
    position: fixed;
    top: 0;
    right: 0;
    width: 150px;
    background: #ffc107;
    color: #212529;
    font-weight: 700;
    font-size: 10px;
    text-align: center;
    line-height: 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transform: rotate(45deg) translate(38px, -15px);
    z-index: 99999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}