/* Twitter Image Resizer - tool-specific styles on top of the shared
 * image-tools.css: the padding-colour row, the header safe-area preview,
 * and the sizes cheat-sheet. X blue accent shared by every twitter-* tool. */

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

/* ---- Header safe-area preview ---- */
.tir-preview {
    margin: 18px 0 4px;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 14px;
    padding: 18px 20px 14px;
}
.tir-preview[hidden] { display: none; }
.tir-preview-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tir-preview-title { margin: 0; font-size: 1rem; font-weight: 700; color: #1f2937; }
.tir-preview-toggle { font-size: 0.86rem; color: #334155; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* The stage keeps the 3:1 header shape; the overlay is positioned in
 * percentages of it (1500 x 500 = 100% x 100%). */
.tir-stage {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 3 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #eef0f3;
}
.tir-stage img { display: block; width: 100%; height: 100%; object-fit: fill; }
.tir-overlay { position: absolute; inset: 0; pointer-events: none; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; }
.tir-overlay[hidden] { display: none; }
.tir-crop { position: absolute; left: 0; right: 0; height: 12%; background: rgba(15, 23, 42, 0.55); color: #fff; display: flex; align-items: center; justify-content: center; }
.tir-crop-top { top: 0; }
.tir-crop-bottom { bottom: 0; }
.tir-safe { position: absolute; left: 0; right: 0; top: 12%; bottom: 12%; border-top: 1px dashed rgba(255, 255, 255, 0.9); border-bottom: 1px dashed rgba(255, 255, 255, 0.9); display: flex; align-items: flex-start; justify-content: flex-end; padding: 4px 8px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
/* Profile picture: about 400 of 1500 wide (26.7%), circle, its centre on
 * the header's bottom edge at the left margin. */
.tir-avatar {
    position: absolute;
    left: 4%;
    bottom: -40%;
    width: 26.7%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8%;
    color: #475569;
    box-sizing: border-box;
}
.tir-preview-note { margin: 10px 0 0; font-size: 0.84rem; color: #64748b; }

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

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