/* ChatGPT_Image.css */

/* Basic reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Page layout */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #222;
}

/* Main container for all rows */
.rows-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

/* Each row: 3 equal columns on larger screens */
.row-item {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 equal columns */
    gap: 1.5rem;                                      /* same gap between all columns */
    margin-bottom: 2rem;
    align-items: stretch;                             /* all cells the same height */
}

/* Let grid cells stretch and inner boxes fill them */
.row-media,
.row-text {
    display: flex;
    align-items: stretch;
}

/* Inner boxes fill the height of their cell */
.media-box,
.text-box {
    flex: 1 1 auto;
}

/* IMAGE / MEDIA BOX (columns 1 & 3) */
.media-box {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background-color: #ddd;
    box-shadow: 2px 2px 7px rgba(0, 0, 0, 0.15);
    min-height: 220px; /* prevents the “tiny” side boxes */
}

/* Image itself */
.media-box img {
    display: block;
    width: 100%;
    height: auto;
}

/* Optional label/number badge in upper-left (you use "Result" on the right) */
.media-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    border-radius: 999px;
}

/* Caption overlay along bottom edge (used on left image) */
.media-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8),
        rgba(0, 0, 0, 0.2)
    );
}

/* CENTER TEXT BOX (column 2) */
.text-box {
    border: 1px solid #ddd;
    border-radius: 15px;
    background-color: #ffffff;
    padding: 1rem 1.25rem;
    box-shadow: 2px 2px 7px rgba(0, 0, 0, 0.08);
    line-height: 1.55;
    user-select: text; /* explicitly allow selecting/copying */
}

.text-box h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.text-box p {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Optional: style the <hr> you placed after each row */
.rows-container hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 0 0 2rem;
}

/* RESPONSIVE: stack columns vertically on narrow screens */
@media (max-width: 900px) {
    .row-item {
        grid-template-columns: 1fr; /* all three stack vertically */
    }
}

/* Overlay backdrop */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;                 /* hidden by default */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 9999;
}

/* Show when active */
.modal-overlay.is-visible {
    display: flex;
}

/* Modal window */
.modal-window {
    background: #ffffff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* Header */
.modal-window h2 {
    margin: 1rem 1.5rem 0.5rem;
    font-size: 1.3rem;
}

/* Close button */
.modal-close {
    border: none;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    align-self: flex-end;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

/* Scrollable content area */
.modal-content {
    padding: 0 1.5rem 1.5rem;
    overflow-y: auto;
}

/* Inner list styling */
.chatgpt-image-concerns {
    padding-left: 1.25rem;
    margin: 0 0 0.5rem;
}

.chatgpt-image-concerns > li {
    margin-bottom: 0.75rem;
}

.chatgpt-image-concerns ul {
    margin-top: 0.25rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .modal-window {
        max-width: 100%;
        border-radius: 8px;
    }

    .modal-window h2 {
        margin: 0.75rem 1rem 0.5rem;
        font-size: 1.1rem;
    }

    .modal-content {
        padding: 0 1rem 1rem;
    }
}

