/* © 2025 VEX LLC. All rights reserved. */
/* ===================================================================
   RESPONSIVE.CSS - Cross-device responsive overrides
   =================================================================== */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

.main-content,
.screen,
.section,
.chat-wrapper,
.chat-messages,
.modal-content {
    min-width: 0;
}

.screen {
    min-height: calc(100dvh - 160px);
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1023px) {
    .hero-banner {
        margin: 16px;
    }

    .section-header,
    .section,
    .quick-grid,
    .quick-actions-bar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .time-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .chat-bubble {
        max-width: 88%;
    }

    .sos-action-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nps-feedback-section {
        border-radius: 20px 20px 0 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        padding-bottom: calc(84px + var(--safe-bottom));
    }

    .header {
        padding: calc(var(--safe-top) + 12px) 12px 12px;
    }

    .header-avatar {
        width: 40px;
        height: 40px;
    }

    .header-name {
        font-size: 16px;
    }

    .header-btn {
        width: 40px;
        height: 40px;
    }

    .hero-banner {
        margin: 12px;
        min-height: 148px;
        border-radius: 18px;
    }

    .hero-content {
        padding: 16px;
    }

    .hero-title {
        font-size: 18px;
    }

    .hero-text {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .hero-image {
        width: 120px;
        right: -12px;
        opacity: 0.25;
    }

    .section-header,
    .section,
    .quick-grid,
    .quick-actions-bar {
        padding-left: 12px;
        padding-right: 12px;
    }

    .section-header {
        margin: 18px 0 12px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .quick-item {
        border-radius: 14px;
        padding: 12px 8px;
    }

    .quick-icon {
        width: 48px;
        height: 48px;
        border-radius: 24px;
        font-size: 22px;
    }

    .quick-label {
        font-size: 11px;
    }

    .chat-wrapper {
        height: calc(100dvh - 146px);
    }

    .chat-header {
        padding: 12px;
        gap: 10px;
    }

    .chat-messages {
        padding: 12px;
    }

    .chat-bubble {
        max-width: 92%;
        font-size: 14px;
        line-height: 1.5;
        padding: 12px 14px;
        border-radius: 16px;
    }

    .chat-input-area {
        padding: 10px 12px;
        gap: 8px;
    }

    .chat-input-wrapper {
        border-radius: 22px;
        padding: 4px 6px 4px 12px;
    }

    .chat-send,
    .voice-btn {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .chat-attach {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-content {
        border-radius: 18px 18px 0 0;
        padding: 20px 12px calc(var(--safe-bottom) + 20px);
    }

    .lgpd-overlay {
        padding: 12px;
    }

    .lgpd-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .sos-active-screen {
        padding: 12px;
    }

    .sos-status-text {
        font-size: 20px;
    }

    .sos-action-row {
        grid-template-columns: 1fr;
    }

    .sos-progress-bar {
        overflow-x: auto;
        gap: 8px;
        justify-content: flex-start;
    }

    .sos-progress-step {
        min-width: 86px;
    }

    .sos-progress-step .step-label {
        white-space: normal;
        line-height: 1.2;
    }

    .consultation-steps {
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 6px;
    }

    .step-item {
        min-width: 74px;
    }

    .step-item:not(:last-child)::after {
        left: 65%;
        width: 70%;
    }

    .device-status {
        flex-direction: column;
    }

    .video-self-preview {
        width: 76px;
        height: 106px;
        top: 12px;
        right: 12px;
    }

    .video-call-controls {
        padding: 12px;
        gap: 10px;
    }

    .video-control-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .video-control-btn.end-call {
        width: 56px;
        height: 56px;
    }

    .nps-header {
        padding: 28px 16px 38px;
        border-radius: 0 0 22px 22px;
    }

    .nps-header-title {
        font-size: 20px;
    }

    .nps-vet-card {
        margin: 0 12px 18px;
        padding: 12px;
        flex-wrap: wrap;
    }

    .nps-duration {
        width: 100%;
        justify-content: center;
    }

    .nps-question,
    .nps-actions {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Small mobile */
@media (max-width: 420px) {
    .screen {
        min-height: calc(100dvh - 150px);
    }

    .quick-grid {
        gap: 8px;
    }

    .quick-item {
        padding: 10px 6px;
    }

    .chat-bubble {
        max-width: 96%;
        font-size: 13px;
    }

    .chat-input {
        font-size: 15px;
    }

    .nps-score {
        width: 36px;
        height: 44px;
    }

    .rating-modal-star {
        font-size: 32px;
    }
}
