/* ===== VPO Global Mobile Optimization ===== */
/* Shared responsive fixes loaded by all pages */
/* v=20260305mobile */

/* ===== GLOBAL: ios zoom prevention ===== */
@media (max-width: 768px) {

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ===== GLOBAL: touch target minimums ===== */
@media (max-width: 768px) {

    button,
    a.btn,
    [role="button"],
    .btn-primary,
    .btn-secondary,
    .chip,
    .chip-multi {
        min-height: 44px;
    }
}

/* ===== GLOBAL: viewport & overflow ===== */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
    }

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }
}

/* ===== UPDATE.LOG floating button (all pages) ===== */
@media (max-width: 768px) {

    .update-log-container,
    [class*="update-log"] {
        bottom: 8px !important;
        right: 8px !important;
        max-width: 200px;
        font-size: 11px !important;
        z-index: 9990;
    }

    .update-log-container .close-btn,
    [class*="update-log"] .close-btn {
        padding: 8px;
    }
}

/* ===== SHARED HEADER — Hamburger Menu ===== */
@media (max-width: 768px) {
    .shared-header {
        padding: 0 12px;
        height: 50px;
    }

    .shared-header .header-brand {
        font-size: 11px;
    }

    .hamburger-menu {
        width: 85vw;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .shared-header {
        padding: 0 10px;
        height: 46px;
    }

    .shared-header .header-brand {
        font-size: 10px;
        letter-spacing: 0.3px;
    }
}

/* ===== PORTAL-SUB pages: 480px breakpoint ===== */
@media (max-width: 480px) {
    .sp-page {
        padding: 60px 14px 30px;
    }

    .sp-hero-title {
        font-size: 22px;
    }

    .sp-hero-desc {
        font-size: 12px;
    }

    .sp-section-heading {
        font-size: 18px;
    }

    .sp-content h2 {
        font-size: 18px;
    }

    .sp-content h3 {
        font-size: 15px;
    }

    .sp-content p {
        font-size: 13px;
    }

    .sp-card {
        padding: 16px;
    }

    .sp-stat-num {
        font-size: 22px;
    }

    .sp-article-preview {
        padding: 20px 16px;
    }

    .sp-article-title {
        font-size: 18px;
    }

    .sp-article-q {
        font-size: 14px;
    }

    .sp-faq-q {
        font-size: 13px;
        padding: 14px 16px;
    }

    .sp-event-format-val {
        font-size: 18px;
    }

    .sp-tl-year {
        font-size: 16px;
    }

    .sp-form-input,
    .sp-form-textarea,
    .sp-form-select {
        font-size: 16px;
        padding: 12px;
    }

    .sp-form-submit {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }

    .sp-inline-speakers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .sp-map-area {
        padding: 20px 16px;
    }

    .sp-ai-pipeline {
        grid-template-columns: 1fr;
    }
}

/* ===== PARTICIPANT-LOGIN page ===== */
@media (max-width: 768px) {
    .auth-container {
        padding: 60px 16px 30px;
    }

    .auth-card {
        padding: 20px 16px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-subtitle {
        font-size: 13px;
    }

    .auth-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .auth-btn {
        padding: 14px;
        font-size: 14px;
    }

    .profile-input-section .form-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 56px 12px 24px;
    }

    .auth-card {
        padding: 18px 14px;
        border-radius: 10px;
    }

    .auth-title {
        font-size: 18px;
    }

    .auth-btn {
        padding: 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    .form-label {
        font-size: 12px;
    }

    .survey-option,
    .survey-radio-item {
        padding: 8px 14px;
        font-size: 12px;
    }

    .country-select-btn {
        font-size: 14px;
        padding: 12px;
    }
}

/* ===== SPEAKER-ENTRY / SPONSOR-ENTRY pages ===== */
@media (max-width: 768px) {
    .entry-header {
        padding: 10px 16px;
    }

    .hero-section {
        padding: 20px 16px 30px;
    }

    .hero-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .hero-title {
        font-size: 20px;
    }

    .hero-desc {
        font-size: 13px;
    }

    .form-card {
        padding: 20px 16px;
    }

    .progress-bar {
        padding: 0 16px;
    }

    .photo-upload-section {
        flex-direction: column;
        align-items: center;
    }

    .photo-preview {
        width: 80px;
        height: 80px;
    }

    .confirm-table th,
    .confirm-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .confirm-table th {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .entry-header {
        padding: 8px 12px;
    }

    .header-logo {
        font-size: 12px;
    }

    .hero-section {
        padding: 16px 12px 24px;
    }

    .hero-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-bottom: 16px;
    }

    .hero-title {
        font-size: 18px;
    }

    .hero-desc {
        font-size: 12px;
    }

    .form-card {
        padding: 16px 12px;
        border-radius: 10px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 12px;
        font-size: 16px;
        /* iOS zoom prevention */
    }

    .chip,
    .chip-multi {
        padding: 8px 14px;
        font-size: 12px;
    }

    .btn-next,
    .btn-prev,
    .btn-submit {
        padding: 14px;
        font-size: 15px;
    }

    .btn-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-actions>* {
        width: 100%;
    }

    .step-label {
        font-size: 11px;
    }

    .progress-segment {
        height: 4px;
    }

    .file-upload-area {
        padding: 24px 16px;
    }

    .upload-text {
        font-size: 12px;
    }

    .confirm-table {
        font-size: 12px;
    }

    .confirm-table th {
        width: 80px;
        font-size: 11px;
    }
}

/* ===== MESSAGES page ===== */
@media (max-width: 768px) {
    .msg-layout {
        flex-direction: column;
        height: calc(100vh - 50px);
    }

    .msg-sidebar {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        width: 100% !important;
        transform: translateX(0);
        transition: transform .3s ease;
    }

    .msg-sidebar.hidden {
        transform: translateX(-100%);
    }

    .msg-main {
        width: 100% !important;
    }

    .chat-back {
        display: inline-flex !important;
    }

    .msg-input {
        font-size: 16px !important;
    }

    .chat-input-area {
        padding: 10px 12px;
    }

    .chat-header {
        padding: 10px 14px;
    }

    .conv-item {
        padding: 10px 14px;
    }

    .conv-avatar {
        width: 38px;
        height: 38px;
    }

    .msg-bubble {
        max-width: 85%;
        font-size: 14px;
    }

    .msg-reaction {
        font-size: 11px;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .chat-header .chat-partner-info {
        gap: 8px;
    }

    .chat-partner-name {
        font-size: 13px;
    }

    .chat-partner-company {
        font-size: 10px;
    }

    .msg-bubble {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .sidebar-header h2 {
        font-size: 16px;
    }

    .conv-name {
        font-size: 13px;
    }

    .conv-preview {
        font-size: 11px;
    }
}

/* ===== FEEDBACK page ===== */
@media (max-width: 768px) {
    .feed-container {
        padding: 16px;
    }

    .speaker-card {
        flex-direction: column;
    }

    .speaker-photo-col {
        align-self: center;
    }

    .speaker-photo {
        width: 72px;
        height: 72px;
    }

    .speaker-info {
        text-align: center;
    }

    .speaker-actions {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }

    .countdown-box {
        min-width: 50px;
        padding: 8px 10px;
    }

    .countdown-num {
        font-size: 20px;
    }

    .meeting-modal-content {
        width: 95%;
        max-width: 95vw;
        max-height: 85vh;
        margin: auto;
    }
}

@media (max-width: 480px) {
    .feed-container {
        padding: 12px;
    }

    .header-title {
        font-size: 18px;
    }

    .speaker-card {
        padding: 14px;
    }

    .speaker-name {
        font-size: 15px;
    }

    .vote-btn {
        padding: 10px 18px;
        font-size: 12px;
        min-height: 44px;
    }

    .meeting-btn {
        padding: 8px 14px;
        font-size: 11px;
        min-height: 44px;
    }

    .comment-input {
        font-size: 16px;
    }

    .submit-btn {
        font-size: 15px;
        padding: 14px;
        min-height: 48px;
    }
}

/* ===== CONTACT page additions ===== */
@media (max-width: 480px) {
    .sp-form-group {
        margin-bottom: 16px;
    }

    .sp-form-label {
        font-size: 12px;
    }
}

/* ===== PRICING page additions ===== */
@media (max-width: 480px) {
    .sp-pricing-grid {
        grid-template-columns: 1fr;
    }

    .sp-pricing-card {
        padding: 20px;
    }

    .sp-pricing-val {
        font-size: 28px;
    }
}

/* ===== EMAIL-VERIFY page ===== */
@media (max-width: 480px) {
    .verify-container {
        padding: 56px 14px 24px;
    }

    .verify-card {
        padding: 20px 16px;
    }
}

/* ===== 404 page ===== */
@media (max-width: 480px) {
    .error-container {
        padding: 56px 14px 24px;
    }

    .error-code {
        font-size: 80px;
    }
}

/* ===== ADMIN pages ===== */
@media (max-width: 768px) {
    .admin-container {
        padding: 60px 12px 20px;
    }

    .admin-card {
        padding: 16px;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
    }
}

/* ===== Scroll behavior for all anchors ===== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 56px;
    }
}