* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --accent-color: #A2DFF6;
    --deep-color: #2c3e50;
    --track-off: #fff;
    --track-on: var(--accent-color);
    --knob-color: var(--deep-color);;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #F5F5F2;
    font-family: 'Inter', sans-serif;
    color: #2C3E50;
}

.page-wrapper {
    max-width: 1400px;
    width: 70%;
    margin: 0 auto;
}

.center { text-align: center; }
a { text-decoration: none; color: #2a649e; }

h1 { font-size: 1.5rem; }

.branding { 
    display: inline-flex; 
    align-items: center;
    margin-bottom: .5rem;
}

.branding svg { vertical-align: middle; margin-right: .5rem; }
.brand-wrapper { 
    padding: 0 2rem;
    margin-bottom: 1.5rem;
 }
h2 {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: .5rem;
}

.free { 
    display: inline;
    font-size: .5rem;
    text-transform: uppercase;
    border: #d3d3d3 1px solid;
    padding: .3rem .7rem;
    border-radius: 100px;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: .5rem auto 0 auto;
}

.search-container input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid #ccc;
    border-radius: 9999px;
    font-size: 1rem;
    outline: none;
}

#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 150px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    z-index: 9999;
    display: none;
    margin: 0;
    padding:.5rem;
    list-style: none;
}

/* .cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
width: 100%;
max-width: 1000px;
margin: 0 auto;
} */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 0 auto;
    max-width: 1000px; /* default for normal screens */
}
.cards:has(.card:nth-child(-n+8):last-child) .card {
    min-height: 25vh;
}

/* De-bugging styles 
.cards { outline: 2px dashed red; }
.card { outline: 1px solid blue; }
*/

@media (min-width: 1200px) {
    .cards { max-width: 1200px; } /* Laptops / mid screens */
}

@media (min-width: 1600px) {
    .cards { max-width: 1400px; } /* Large desktops */
}

@media (min-width: 2000px) {
    .cards { max-width: 1600px; } /* Ultra-wide monitors */
}

.card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 2px 2px 1px rgba(0,0,0,0.1);
    transition: background-color 0.5s ease;
    display: flex;
    flex-direction:column;
    align-items:center;
    justify-content: center;
}
.card.working-hours {
    border-bottom: 12px solid #2c3e50;
    box-sizing: border-box;
}
.city {
    font-size: 1rem;
    font-weight: normal;
    margin-bottom: 1.rem;
}

.clock {
    font-size: 3.2rem;
    font-weight: 500;
    margin-top: .7rem;
}
.clock span { font-size: 1rem; }

.emoji {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1rem;
}
.timezone { font-size: 12px; margin: .55rem; }

.card button {
    position: absolute;
    top: 5px;
    left: 5px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: .9rem;
    color: inherit;
}

.card .person button  { left: 20px; }
.card .person  { font-weight: 500; }
.card .person input[type=text] { padding: .2rem; }

.day { background: #A2DFF6; color: #2c3e50; }
.night { background: #2c3e50; color: white; }

.actions {
    margin: 1rem auto;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

label.times { font-size: 14px; }
label.times svg { position: relative; bottom: 2px; }

#timeSlot {
    margin-left: 15px;
    padding: .2rem .5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 36px 8px 12px; /* space for arrow */
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 150px;
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="%231f1f1f"><path d="M480-360 280-560h400L480-360Z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px 24px;
    cursor: pointer;
}

#container01 > .wrapper > .inner {
padding: 0;
}

.container-2col {
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content:space-between;
}

.share-wrapper { 
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    font-size: .85rem;
}

.share-btn {
    margin: 1rem auto;
    display: block;
    padding: 0.5rem 1rem;
    font-size: .85rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #2c3e50;
    cursor: pointer;
    border: 1px solid #ccc;
}
.share-btn:hover { border: 1px solid #2c3e50; }

button:focus, select:focus { outline: 1px solid #ccc; }

.toggle {
    flex-grow: 1;
    margin: 0 auto;
    font-size: .75rem;
    line-height: 1.3;
    text-align: left;
    color: #2C3E50;
    max-width: 400px;
}

.toggle summary { margin-bottom: 5px; font-weight: 600; }
.toggle ul { list-style-type: '– ';padding-left: 15px; }
.toggle ul li { margin-bottom: 5px; }
.toggle ul li::marker { color: #ccc; }

.toggle h4 {
    padding: 5px;
    font-weight: 500;
    margin: 10px 0 5px 0;
    border-top: 1px solid #ccc;
}



.time-format-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.time-format-toggle input {
    display: none;
}

.time-format-toggle .slider {
    position: relative;
    width: 38px;
    height: 20px;
    background-color: var(--track-off);
    border-radius: 10px;
border: 1px solid var(--deep-color);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.time-format-toggle .slider::before {
    content: "";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 16px;
    background-color: var(--knob-color);
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease;
}

.time-format-toggle input:checked+.slider {
    background-color: var(--track-on);
}

.time-format-toggle input:checked+.slider::before {
    transform: translateX(18px);
}

.time-format-toggle .label {
    color: #333;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .time-format-toggle .label {
        color: #ddd;
    }

    .time-format-toggle .slider {
        background-color: #555;
    }
}

footer { margin: 1rem 0; text-align: center; }
footer p {
    margin: 1rem 0;
    font-size: 1rem;
    line-height: 1.2;
}
footer p span { font-size: .8rem; }

@media (max-width: 600px) {
.actions { flex-direction: column; }
.share-btn { margin: 0; }
.share-wrapper { justify-content: center; }
h2 { margin-bottom: .5rem; }
.search-container { margin: 0 auto; }
.share-btn { font-size: .9rem; }
.brand-wrapper { padding: 0 1rem; }
.page-wrapper { width: 100%; padding: 0 1rem; }
#clocksGrid { margin-top: 1rem; }
.container-2col { flex-direction: column; }
}
