/* Support popups (/support and /support/show/:id).
   The content rules (support-content-flex, quick-links-section, support-header,
   chat-container, message bubbles, ticket table) already live in styles.css,
   which /play loads. This file only sizes the modal frame and makes the
   conversation scroll inside it. */

.support-modal {
    width: 95%;
    max-width: 1180px;
}

.support-modal .support-content-flex {
    gap: 20px;
    margin-bottom: 20px;
}

.support-modal .contact-form-section,
.support-modal .support-tickets-section {
    padding: 24px;
    min-width: 0;
}

.support-modal .section-subtitle {
    margin-bottom: 20px;
}

/* One conversation per popup: header on top, scrolling messages, reply form
   pinned to the bottom. */
.support-ticket-modal {
    width: 95%;
    max-width: 900px;
    height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.support-ticket-modal .user-profile-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
}

.support-ticket-modal .support-header {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.support-ticket-modal .chat-container {
    flex: 1;
    min-height: 0;
}

.support-ticket-modal .messages-area {
    min-height: 0;
}

.support-ticket-modal .reply-form {
    flex-shrink: 0;
}

/* The close X lives inside the header row here so it cannot cover the ticket
   subject or the Close button. */
.support-ticket-close-inline {
    position: static;
    margin-left: 8px;
    flex-shrink: 0;
}

.support-ticket-modal .header-top {
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .support-modal .support-content-flex {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .support-modal .contact-form-section,
    .support-modal .support-tickets-section {
        padding: 18px;
    }

    .support-ticket-modal {
        height: 90vh;
        max-height: 90vh;
    }

    .support-ticket-modal .user-profile-modal-body {
        padding: 10px;
    }
}

/* Phones: /game/:id shell. The frame is full width and the page owns the
   scrollbar; the conversation keeps its own fixed height so the messages still
   scroll between the header and the reply form. */
@media (max-width: 640px) {
    .user-profile-modal-overlay .support-ticket-modal {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 16px;
        height: calc(100vh - 44px);
        max-height: calc(100vh - 44px);
        overflow: hidden;
    }
}
