/* YouTube Image Resizer - tool-specific styles on top of the shared
 * image-tools.css: the padding-colour row, the banner safe-area preview,
 * and the sizes cheat-sheet. YouTube red accent set inline in index.php. */

.yir-pad-row { display: flex; align-items: center; gap: 8px; }
.yir-pad-row .it-select { flex: 1 1 auto; min-width: 0; }
.yir-color {
    width: 38px;
    height: 34px;
    padding: 2px;
    border: 1px solid #d7dbe0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}
.yir-color[hidden] { display: none; }

/* ---- Banner safe-area preview ---- */
.yir-preview {
    margin: 18px 0 4px;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 14px;
    padding: 18px 20px 14px;
}
.yir-preview[hidden] { display: none; }
.yir-preview-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.yir-preview-title { margin: 0; font-size: 1rem; font-weight: 700; color: #1f2937; }
.yir-preview-toggle { font-size: 0.86rem; color: #334155; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* The stage keeps the 16:9 banner shape; the overlay zones are
 * percentages of the 2560 x 1440 canvas: desktop strip 423 px tall
 * (top 35.31%, height 29.38%), safe area 1546 px wide (left 19.8%,
 * width 60.4%) centred inside it. */
.yir-stage {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #eef0f3;
}
.yir-stage img { display: block; width: 100%; height: 100%; object-fit: fill; }
.yir-overlay { position: absolute; inset: 0; pointer-events: none; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; }
.yir-overlay[hidden] { display: none; }
.yir-zone { position: absolute; color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; }
.yir-tv-top    { top: 0;    left: 0; right: 0; height: 35.31%; background: rgba(15, 23, 42, 0.6); }
.yir-tv-bottom { bottom: 0; left: 0; right: 0; height: 35.31%; background: rgba(15, 23, 42, 0.6); }
.yir-desk-left  { top: 35.31%; height: 29.38%; left: 0;  width: 19.8%; background: rgba(15, 23, 42, 0.32); }
.yir-desk-right { top: 35.31%; height: 29.38%; right: 0; width: 19.8%; background: rgba(15, 23, 42, 0.32); }
.yir-desk-left span, .yir-desk-right span { font-size: 0.62rem; padding: 0 4px; }
.yir-safe {
    position: absolute;
    top: 35.31%;
    height: 29.38%;
    left: 19.8%;
    width: 60.4%;
    border: 2px dashed rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 4px 8px 5px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
}
.yir-preview-note { margin: 10px 0 0; font-size: 0.84rem; color: #64748b; }

/* ---- Sizes table ---- */
.yir-sizes {
    margin: 18px 0 4px;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 14px;
    padding: 18px 20px 14px;
}
.yir-sizes-title { margin: 0 0 10px; font-size: 1rem; font-weight: 700; color: #1f2937; }
.yir-sizes-wrap { overflow-x: auto; }
.yir-sizes-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.yir-sizes-table th, .yir-sizes-table td { padding: 9px 10px; border-bottom: 1px solid #eef0f3; text-align: left; vertical-align: top; }
.yir-sizes-table th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; }
.yir-sizes-table tbody tr:last-child td { border-bottom: 0; }
.yir-sizes-table .yir-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.yir-sizes-table .yir-note-col { color: #64748b; font-size: 0.84rem; }
.yir-sizes-foot { margin: 10px 0 0; font-size: 0.84rem; color: #64748b; }

@media (max-width: 640px) {
    .yir-sizes-table .yir-note-col { display: none; }
    .yir-sizes-table .yir-num { white-space: normal; }
    .yir-overlay { font-size: 0.6rem; }
    .yir-desk-left span, .yir-desk-right span { display: none; }
}
