/* style.css*/

/* v15c : 03/04/26  */
/*      :  minor adjustmemt to legend style */
/* v15b : 23/03/26  */
/*      :  minor adjustmemt to legend & legend span to fit mobile better *//* v15b : 23/03/26  */
/*      :  minor adjustmemt to legend & legend span to fit mobile better */
/** v15 : 21/03/26  */
/*      :  control legend box size for mobile */

/** v14 : 20/03/26  */
/*     :  colours added for grade display, existting green/yellow modified  */

/*  version : v13 12/01/26  */
/*          :h1 spec removed  */

/*  version : v12 16/11/25  */
/*          : style for file export pop up  */
/*  version : v11 27/10/25  */
/*          : comment added w.r.t. appearance  */
/*  version : v10 20/10/25  */
/*           : added in short form entry for walk date */
/*           : some other minor editting */

/*  version : v9 11/10/25  */

p.info {color: #191970;  font-size: 24px;}

/* can be any name */
/* used to control button sizes*/

/* === Base button styles === */
.box {
    border: 2px solid;
    background-color: white;
    padding: 0.3vw 0.3vw;
    font-size: 24px;
    cursor: pointer;
    width: 15vw;
    margin-bottom: 10px;
    border-radius: 10px;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    text-align: center;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.2;
}

.box_mobile {
    border: 2px solid;
    background-color: white;
    padding: 0.5vw 0.5vw;
    font-size: 5vw;
    cursor: pointer;
    width: 40vw;
    margin-bottom: 5px;
    border-radius: 12px;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    text-align: center;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.2;
}

    /* === Procedure notes button (green theme) === */
    .box.link,
    .box_mobile.link {
        border-color: #04AA6D;
        color: #04AA6D;
        background-color: white;
    }

        .box.link:hover,
        .box_mobile.link:hover {
            background-color: #04AA6D;
            color: white;
            border-color: #04AA6D;
        }

/* === Refresh / Update button (red theme) === */
.box.link_refresh {
    border-color: #FF0000;
    color: #FF0000;
    background-color: white;
    padding: 0.3vw 0.3vw;
    font-size: 24px;
    border-radius: 10px; /* match .box corners */
}

.box_mobile.link_refresh {
    border-color: #FF0000;
    color: #FF0000;
    background-color: white;
    padding: 0.5vw 0.5vw;
    font-size: 5vw;
    border-radius: 12px; /* match .box_mobile corners */
}

    .box.link_refresh:hover,
    .box_mobile.link_refresh:hover {
        background-color: #04AA6D;
        color: white;
        border-color: #04AA6D;
    }

/* === Flex container for button row === */
.button-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

    .button-row > form,
    .button-row > .btn-wrapper {
        margin: 0;
        padding: 0;
        display: inline-flex;
        align-items: center;
    }

    .button-row button {
        cursor: pointer;
        vertical-align: middle;
    }

/****************************************************
 * Base table styling — shared by all table types
 ****************************************************/
.table-base {
    border-collapse: separate; /* keeps border-radius working */
    border-spacing: 0;
    border: 2px solid #000;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0; /* vertical spacing */
    font-size: 16px;
}

    /* Table cells */
    .table-base th,
    .table-base td {
        padding: 2px 5px;
        border: 1px solid #000;
        vertical-align: middle;
    }

    /* Header styling */
    .table-base th { background-color: #007ACC; color: #fff; }

    /* Row color states */
    .table-base tr.red { background-color: #ccc; color: #000; }

    /* .table-base tr.yellow { background-color: #ff0; color: #000; } */
    .table-base tr.yellow { background-color: #FFF176; color: #000; }

    /*.table-base tr.green { background-color: #0f0; color: #000; } */
    .table-base tr.green { background-color: #81C784; color: #000; }

    .table-base tr.chocolate { background-color: #D2691E; color: #000; }

    .table-base td.white {background-color: #fefefe; color: #000; }


    /* Highlight cells (used in booking tables) */

    .table-base .cell-highlight {
        background-color: #f00; /* keep original bright red */
        font-weight: bold;
        color: #FFEAEA; /* soft off-white text for readability */
    }

/* Button cell (shared) */
.table-base td.button-cell {
    background-color: #00FF00;
    text-align: center;
}

        /* Centered form + button */
        .table-base td.button-cell form {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
            margin: 0;
            gap: 6px; }

/****************************************************
 * booking_tables — for booked walks & main booking
 ****************************************************/
.booking_tables { } /* inherits from table-base */

/****************************************************
 * date_table — for date inputs in stats.php
 ****************************************************/
.date_table {} /* inherits from table-base */

.date_table th { background-color: #0f0; color: #000; font-weight: bold ;} /* green , black text */
.date_table .quarter-label { background-color: #0f0; color: black; padding: 5px; font-weight: bold;}

    /* Large date input for table */
    .date_table input[type="date"] {
        width: 150px; /* Increase field width */
        font-size: 18px; /* Larger text */
        padding: 5px; /* Increase height */
        border-radius: 6px; /* (Optional) Rounded corners */
        border: 1px solid #444; /* (Optional) Visible border */
        box-sizing: border-box; /* Prevent padding from increasing width */
    }

        /* Increase the size of the calendar picker icon (Chrome, Edge, Safari) */
        .date_table input[type="date"]::-webkit-calendar-picker-indicator {
            width: 26px;
            height: 26px;
            padding: 4px;
            cursor: pointer; /* Shows a pointer hand on hover */
        }

/* Firefox-specific size adjustments */
@-moz-document url-prefix() {
    .date_table input[type="date"] {
        font-size: 18px;
        padding: 8px; /* Firefox needs slightly more padding */
    }
}


/****************************************************
 * admin_tables — for walk edit admin screens
 ****************************************************/
.admin_tables { }  /* inherits from table-base */

/* First column left, second column right */
    .admin_tables th:first-child,
    .admin_tables td:first-child {
        text-align: left; }

    .admin_tables th:nth-child(2),
    .admin_tables td:nth-child(2) {
        text-align: right; }

    /* Forms inside admin tables: input/select left, button right */
    .admin_tables td > form {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        box-sizing: border-box; }

    /* Fixed width for input/select in column 3 */
    .admin_tables td:nth-child(3) input[type="text"],
    .admin_tables td:nth-child(3) select {
        width: 150px;
        box-sizing: border-box; }

/****************************************************
 * new_booking_table — for new booking / new walk
 ****************************************************/
.new_booking_table { }  /* inherits from table-base */

    /* Column widths for inputs/selects */
    .new_booking_table td:nth-child(2) input[type="text"],
    .new_booking_table td:nth-child(2) select {
        width: 350px;
        box-sizing: border-box;  }

    /* Forms: align left, space between input and button */
    .new_booking_table td > form {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;  }

/* Used for new walker table variant */
.new_walker_table td:nth-child(2) input[type="text"],
.new_walker_table td:nth-child(2) select {
    width: 350px; /* example override */
}

/****************************************************
 * key_table — for color key reference table
 ****************************************************/
.key_table {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
    width: auto; }

    /* Key table cells */
    .key_table td {
        border: 1px solid #000;
        padding: 5px 10px;
        text-align: left;
        font-size: 16px;
        white-space: nowrap;  }

    /* Key table color cells */
    .key_table .red { background-color: #ccc;  color: #000; }
    .key_table .yellow { background-color: #FFF176; color: #000; }
    .key_table .green { background-color: #81C784; color: #000; }

/* Responsive key table */
@media (max-width: 768px) {
    .key_table td {
        padding: 3px;
        font-size: 3vw; }

    .key_table { width: 95%; }
}

/****************************************************/
/*   reduced field width for dd/mm/yy entry      */
/****************************************************/
.short-input {
    width: 3.0em; /* slightly narrower */
    max-width: 3.0em; /* enforce width */
    box-sizing: border-box; /* include padding/border in width */
    text-align: center; /* center digits */
    display: inline-block;
    margin: 0; /* remove default spacing */
}

.date-separator {
    display: inline-block;
    margin: 0 0.2em; /* small space around "/" */
    vertical-align: middle;
}

/****************************************************/
/*      set button style for ALL submit buttons      */
/****************************************************/

/* Default for desktops */
/* ==================================================
   GLOBAL BUTTON STYLES
   ================================================== */
input[type="submit"],
button[type="submit"] {
    -webkit-appearance: none; /* Chrome, Safari, iOS */
    -moz-appearance: none; /* Firefox */
    /* 'appearance' flagged as not a known css property but is part of offical spec*/
    appearance: none; /* Standard */

    background-color: #FFFFFF; /* white background */
    color: #000000; /* black text */
    font-weight: normal;
    font-size: 16px; 
    padding: 8px 14px; /* top/botton , left/right */
    border: 2px solid #000000;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover effect #E0E0E0  #c2c0c0 *  - removed post 13/10/25 booking as on mobile can cause buttons to be 'sticky'/
/* i.e. can touch which activates 'hover' effect, but isn't registered as a click */
/* --- could globally disable hover for just for submit buttons --- */


/* input[type="submit"]:hover, */
/*  button[type="submit"]:hover { */
/*      background-color: #cccccc; /* darker on hover */
/*     border-color: #333333; */
/*      box-shadow: 2px 2px 5px rgba(0,0,0,0.2); */
/*  } */

/* Mobile adjustment (screens narrower than 600px) */
@media (max-width: 600px) {
    input[type="submit"],
    button[type="submit"] {
        font-size: 16px; /* larger text for touch, was 18 */
        padding: 10px 14px; /* bigger tap area, was 12 16 */
    }
}

/* Optional: remove focus outline for aesthetic, but keep accessibility in mind */
input[type="submit"]:focus,
button[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.3); }

.blueButton {
    background-color: #007ACC !important;
    color: #FFFFFF !important;
    font-weight: bold;
    font-size: 24px; }

/****************************************************/
/* end                                              */
/****************************************************/

body { font-family: Arial, Helvetica, sans-serif; }

/* The Modal (background) */
.modal { 
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 80%; /* Full width */
    height: 80%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; }

/* The Close Button */
.close { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; }
.close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; }

/* added for fail popup */
/* OK Button */
.ok-btn {
    background-color: #4CAF50; /* Green */
    color: white; 
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin-top: 15px;
    cursor: pointer; }

    .ok-btn:hover { background-color: #f1f1c1; }

/* end of added for fail popup */

/* utility ok box */
.SimpleOKBox {
    display: block; /* visible by default when rendered */
    position: fixed; /* floats above page content */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    padding: 20px 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    text-align: center;
    min-width: 250px; }

    .SimpleOKBox p {
        margin-bottom: 20px;
        font-weight: bold; }

    .SimpleOKBox button {
        padding: 6px 16px;
        border: none;
        border-radius: 6px;
        background: #4CAF50;
        color: white;
        font-weight: bold;
        cursor: pointer; }


/******added  to put actions buttons in 2 rows *******/
/* === BUTTON ROW STYLES === */
.button-row {
    display: flex;
    flex-direction: row;
    align-items: center; /* vertically aligns buttons */
    gap: 10px; /* space between buttons */
}

    /* make the form behave nicely as a flex item */
    .button-row > form,
    .button-row > .btn-wrapper {
        margin: 0;
        padding: 0;
        display: inline-flex;
        align-items: center;
    }

    /* ensure consistent button alignment */
    .button-row button {
        cursor: pointer;
        vertical-align: middle;
    }


/**********************************************/
/*****  report section in stats *******/
/**********************************************/

.report-section {
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    width: fit-content;
}

    .report-section h3 {
        margin-top: 0;
    }

    .report-section.error {
        background: #ffe2e2;
        border-color: #ff5c5c;
    }

/**********************************************/
/*****  date entry in stats *******/
/**********************************************/
.big-date {
    font-size: 18px;
    padding: 8px;
    width: 180px;
}

/**********************************************/
/*****  check box in stats *******/
/**********************************************/
.pretty-checkbox {
    display: flex;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    gap: 12px;
}

    .pretty-checkbox input {
        width: 24px;
        height: 24px;
        cursor: pointer;
    }

        .pretty-checkbox input:checked {
            accent-color: #0f0; /* green tick – changeable */
        }

/**********************************************/
/*******disabled button  in stats *******/
/**********************************************/
.disabled-btn {
    opacity: 0.5; /* greyed out */
    cursor: not-allowed; /* blocked cursor on hover */
}


/**********************************************/
/******* Popup container in stats for file download*******/
/**********************************************/
.popup-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border: 2px solid #4CAF50;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    z-index: 9999;
    font-family: Arial, sans-serif;
    border-radius: 8px;
    text-align: center;
    min-width: 260px;
}

/* Success message text */
.popup-message {
    color: green;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Download button */
.popup-download {
    display: inline-block;
    padding: 8px 14px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

/* Close button */
.popup-close {
    padding: 6px 12px;
    border: 1px solid #999;
    border-radius: 4px;
    cursor: pointer;
    background: #eee;
}

/* legend display  */

/* Grade colours */

.g1 { background-color: #A7F3D0; color: #065F46; }
.g2 { background-color: #6EE7E7; color: #0F4C4C; }
.g3 { background-color: #93C5FD; color: #1E40AF; }
.g4 { background-color: #C4B5FD; color: #4C1D95; }
.g5 { background-color: #FCA5A5; color: #991B1B; }

.legend-box {
    max-width: 750px;
    margin: 10px 0; /* left aligned */
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background-color: #f9fafb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

    .legend-box.mobile {
        width: 95%;
        max-width: 95%;
        margin: 10px auto; /* centers it */
        border-radius: 0;
    }

.legend-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #111827;
}

.legend {
    width: 100%; /* fill the box */
    display: flex;
    gap: 4px;
}

    .legend span {
        flex: 1;
        min-width: 0; /* allows shrinking so no overflow */
        text-align: center;
        padding: 4px 4px; /* slightly tighter */
        border-radius: 6px;
        font-size: 12px; /* slightly smaller for mobile fit */
        font-weight: 600;
    }

/*  end of legend   */

/*  to make table entries look same as legend   */

.grade {
    font-size: 16px;
    font-weight: 600; /* 500 is normal, increments of 100*/
    padding: 5px 12px;
/*    border-radius: 8px; */
/*    text-align: center; : already have this defined*/
}

/*  end of table cell detail   */


/*   colours */
/*   #fefefe = white    */
/*   #f1f1c1 = pale tope   */
/*   029900 = muted green    */
/*   efefef = pale grey    */
/*   336799 = dull blue    */
/*   6699CC = pale blue/grey    */
/*   ffffff = white    */
/*   24486b = darker blue/grey    */
/*   010101 = black    */
/*   848484 = mid grey   */
/*   B22222 = fire brick   */
/*  #FF0000 = red  */
/*  #000000 = black (text)  */

/* ===================================================
   FONT-WEIGHT REFERENCE SUMMARY
   ===================================================

   font-weight controls the thickness of text.

   Keywords:
     normal   - default weight, usually 400
     bold     - bold text, usually 700
     lighter  - lighter than the parent element
     bolder   - heavier than the parent element

   Numeric values (100–900) for finer control:
     100 - Thin / Hairline
     200 - Extra light
     300 - Light
     400 - Normal (default)
     500 - Medium
     600 - Semi-bold
     700 - Bold
     800 - Extra bold
     900 - Black / Heavy

   Notes:
     - Some fonts do not support all numeric weights; browsers simulate the closest available.
     - 'lighter' and 'bolder' are relative to the weight of the parent element.
     - Use 'font-weight: normal;' to explicitly prevent bold text even if parent is bold.
     - Numeric values provide more precise control when available in the font.
=================================================== */
