/* ===========================================================
   CONTENT GRID
   The 3x3 panel layout inside the browser window, and each panel's position/frame
   =========================================================== */


/* ---- Grid shell ---- */
.container {
    display: grid;
    width: 100%;
    max-width: 740px;
    height: auto;
    min-height: 280px;
    grid-template-columns: minmax(110px, 140px) minmax(0, 1fr) minmax(110px, 140px);
    grid-template-rows: 60px minmax(0, 1fr) 60px;
    gap: 3px;
    background: #c0c0c0;
    padding: 2px;
    border: 2px outset #dfdfdf;
    box-shadow:
        inset 1px 1px 0 #ffffff,
        inset -1px -1px 0 #808080;
    margin: 0;
    overflow: auto;
}

.box {
    background: linear-gradient(135deg, #dfdfdf 0%, #c0c0c0 100%);
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: normal;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #000000;
    padding: 2px;
}


/* ---- Top-left: clock panel ---- */
.top-left {
    background-image: url(/images/sky.png);
    background-size: cover;
    background-repeat: no-repeat;
    border: 2px solid;
    border-color: #dfdfdf #000080 #000080 #dfdfdf;
    position: relative;
    grid-column: 1;
    grid-row: 1;
    color: white;
    font-weight: bold;
    font-size: 5px;
    padding: 5px;
    overflow: hidden;
}

.top-left time {
    text-shadow: 1px 1px 0 #000000;
    font-family: "Courier New", monospace;
    letter-spacing: 1px;
}

.clock-label {
    position: absolute;
    top: 8px;
    left: 50px;
    font-size: 11px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.4px;
}

.day-night-icon {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 24px;
    height: 24px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 2;
}


/* ---- Left bar: GIF panel ---- */
.left-bar {
    overflow: hidden;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    background: #c0c0c0;
    padding: 1px;
}

.left-bar img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}


/* ---- Bottom-left panel ---- */
.bottom-left {
    background: #008080;
    background-image:
        repeating-linear-gradient(45deg, #008080 0px, #008080 2px, #00a0a0 2px, #00a0a0 4px),
        repeating-linear-gradient(-45deg, #008080 0px, #008080 2px, #00a0a0 2px, #00a0a0 4px);
    background-size: 100% 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 5px;
    gap: 2px;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
}


/* ---- Center panel ---- */
.center {
    grid-column: 2;
    grid-row: 1 / 4;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 2px;
    box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #000000;
}


/* ---- Top-right panel ---- */
.top-right {
    grid-column: 3;
    grid-row: 1;

    padding: 5px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow:
        inset 1px 1px 0 #ffffff,
        inset -1px -1px 0 #000000;
}


/* ---- Middle-right panel ---- */
.middle-right {
    grid-column: 3;
    grid-row: 2;

    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 8px;
    overflow-y: auto;
}


/* ---- Bottom-right panel: GIF button picker ---- */
.bottom-right {
    background: #008080;
    background-image:
        repeating-linear-gradient(45deg, #008080 0px, #008080 2px, #00a0a0 2px, #00a0a0 4px),
        repeating-linear-gradient(-45deg, #008080 0px, #008080 2px, #00a0a0 2px, #00a0a0 4px);
    background-size: 100% 100%;
    display: flex;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3px;
    gap: 1px;
    font-size: 11px;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
}

.gif-button-panel {
    width: 100%;
}

.gif-button-panel h4 {
    margin: 0 0 4px 0;
    color: #000080;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0px;
    width: 100%;
}

.gif-button {
    width: 100%;
    height: 19px;
    /* border: 2px solid; */
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    background: #c0c0c0;
    padding: 0;
    cursor: url("../images/pointer.cur"), pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gif-button:active,
.gif-button.active {
    border-color: #808080 #ffffff #ffffff #808080;
}

.gif-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
