/*! HTML5 Boilerplate v9.0.0-RC1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
    color: #222;
    font-size: 1em;
    line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #8d2c5d;
    text-shadow: none;
}

::selection {
    background: #8d2c5d;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
    display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
    /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    white-space: inherit;
    width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
    content: '';
    display: table;
}

.clearfix::after {
    clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 1.25dppx), (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* Fonts */
.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;
}

/* Custom */

body,
html {
    height: 100%;
    margin: 0;
    background-color: #202124;

    display: grid; /* Enables CSS Grid */
    place-items: center; /* Shortcut for aligning and justifying items in the center */
    min-height: 100vh; /* Full viewport height */
}

h1 {
    color: white;
    margin: 20px;
    text-align: center;
}

canvas {
    /* Your existing canvas styles */
    border: 1px solid #000;
    background-color: #3e7e00;

    margin: 20px;
}

p,
label {
    color: #c5fffd;
}

.myCanvas {
    width: 100%;
}

.controls-container {
    margin: 20px;
    padding-bottom: 50px;
}

.controls-container input[type='number'] {
    margin: 8px 0;
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    border: 3px solid gray; /* Gray border */
    border-radius: 4px; /* Rounded borders */
    box-sizing: border-box; /* Making padding not affect width */
    -webkit-appearance: none; /* Removes default chrome and safari styling */
    -moz-appearance: textfield; /* Removes default Firefox styling */
    transition: border 0.3s, box-shadow 0.3s; /* Smooth transition for focus */

    width: 100%;
}

/* Style for the up and down buttons on number inputs */
.controls-container input[type='number']::-webkit-inner-spin-button,
.controls-container input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none; /* Removes default chrome and safari styling */
}

.controls-container input[type='number']:focus {
    border-color: #af684c; /* Highlighted border color */
    box-shadow: 0 0 8px 0 rgba(76, 175, 80, 0.2); /* Adding a subtle shadow on focus */
    outline: none; /* Removing the default focus outline */
}

.number-input input[type='number'] {
    padding: 0.5rem;
    font-weight: bold;
}

a {
    color: aquamarine;
}
