/* tools/instagram-resizer.css
   The Instagram resizer reuses the watermark maker's layout (watermark.css:
   settings open beside the results). This sheet adds the per-size preview
   cards, the carousel strip, the paired selects and the size table. */

.ig-page .control-group[hidden] {
    display: none !important;
}

.ig-pair {
    display: flex;
    gap: 8px;
}

.ig-pair select {
    flex: 1 1 0;
    min-width: 0;
}

/* Cards take the output's shape (set inline by the script), so a story is
   tall and a landscape post is short; a carousel strip runs the full width. */
.ig-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    align-items: start;
}

.ig-grid .ig-card.is-strip {
    grid-column: 1 / -1;
}

.ig-card .ig-thumb {
    aspect-ratio: 4 / 5;
    background: #0d0d0f;
}

.ig-card .compress-thumb canvas.ig-canvas {
    cursor: default;
    touch-action: auto;
}

.ig-card .compress-thumb canvas.ig-canvas.is-draggable {
    cursor: grab;
}

.ig-card .compress-thumb canvas.ig-canvas.is-draggable:active {
    cursor: grabbing;
}

.ig-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.ig-centre {
    font: inherit;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.ig-centre[hidden] {
    display: none;
}

.ig-card .compress-detail {
    min-width: 0;
}

/* iPhone: the files were made after the first tap; the second tap saves. */
.ig-page .is-ready {
    animation: ig-ready 1.2s ease-in-out 2;
}

@keyframes ig-ready {
    50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.25); }
}

.ig-page .wm-actions {
    flex-wrap: wrap;
}

/* The size table in the page copy. */
.ig-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    margin: 8px 0 12px;
}

.ig-size-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 680px;
    font-size: 0.95rem;
    text-align: left;
}

.ig-size-table th,
.ig-size-table td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: top;
}

.ig-size-table th {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
}

.ig-size-table td:last-child {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .ig-size-table {
        font-size: 0.85rem;
    }
    .ig-size-table th,
    .ig-size-table td {
        padding: 8px 6px;
    }
    .ig-size-table td:last-child {
        white-space: normal;
    }
}

/* The dated size chart under the tool. */
.ig-size-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    padding: 0 0 8px;
}

.ig-updated {
    max-width: 680px;
    font-size: 0.85rem;
    opacity: 0.75;
    line-height: 1.5;
}
