/* PADLZ - Responsive Styles */

/* Tablet (1024px) */
@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 16px 8px; }
    .sidebar-logo svg { width: 50px; }
    .nav-link span, .nav-section-title, .user-details, .logout-btn span { display: none; }
    .nav-link { justify-content: center; padding: 12px; }
    .main-content { margin-left: 80px; padding: 24px; }

    /* Notification dropdown tablet */
    .notification-dropdown {
        left: 90px;
        width: 340px;
    }
    .sidebar-user-row {
        flex-direction: column;
        gap: 8px;
    }
    .sidebar-user-row .user-info {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .event-detail-meta { grid-template-columns: repeat(2, 1fr); }
    .event-detail-body { grid-template-columns: 1fr; }
    .hof-main-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .hof-slider { grid-column: 1; grid-row: auto; }
    .hof-leaderboard { grid-column: 1; grid-row: auto; }
    .hof-badges { grid-column: 1; grid-row: auto; }
    .hof-leaderboard-list { max-height: 500px; }

    /* Spelers Page Tablet */
    .speler-card {
        grid-template-columns: 28px 40px 1fr auto auto;
        gap: 10px;
        padding: 10px 14px;
    }
    .speler-avatar {
        width: 36px;
        height: 36px;
    }
    .speler-stats {
        gap: 12px;
    }
    .speler-stat {
        min-width: 40px;
    }
    .speler-badges {
        min-width: 60px;
    }
    .speler-badge {
        width: 24px;
        height: 24px;
    }
}

/* Mobile (768px) */
@media (max-width: 768px) {
    .nav-link { justify-content: left; }

    /* Show mobile header */
    .mobile-header {
        display: flex;
    }
    .mobile-menu-overlay {
        display: block;
        pointer-events: none;
    }
    .mobile-menu-overlay.active {
        pointer-events: auto;
    }

    /* Sidebar becomes slide-out menu */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: auto;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        padding: 80px 20px 20px;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }
    .sidebar.menu-open {
        transform: translateX(0);
    }
    .sidebar-logo {
        display: none;
    }
    .nav-section-title {
        display: block;
    }
    .sidebar-nav {
        width: 100%;
        flex: 1;
    }
    .nav-section {
        display: flex;
        flex-direction: column;
        margin-bottom: 24px;
    }
    .nav-link {
        flex-direction: row;
        gap: 12px;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--border-radius);
    }
    .nav-link span {
        display: block;
    }
    .sidebar-user {
        display: block;
        margin-top: auto;
        padding-top: 16px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    /* Show user details and logout text on mobile */
    .user-details {
        display: block;
    }
    .logout-btn span {
        display: inline;
    }

    /* Main content adjustments */
    .main-content {
        margin-left: 0;
        margin-top: 60px;
        margin-bottom: 0;
        padding: 16px;
        transform: translate3d(0,0,0);
    }
    .page-title { font-size: 1.75rem; }
    .cards-grid, .badges-grid, .marketplace-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .winner-slide img { height: 300px; }
    .slider-empty { height: 180px; }
    .contact-pref-options { flex-direction: column; }
    .contact-pref-option { justify-content: flex-start; }

    /* Event Card Mobile Styles */
    .event-card {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
        position: relative;
    }
    .event-card .vol-badge,
    .event-card .status-badge {
        position: absolute;
        top: 12px;
        right: 12px;
    }
    .event-date-box {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        min-width: auto;
        width: fit-content;
    }
    .event-date-month {
        margin-bottom: 0;
        order: 1;
    }
    .event-date-day {
        font-size: 1.5rem;
        order: 0;
    }
    .event-content {
        flex-direction: column;
        gap: 12px;
    }
    .event-main {
        width: 100%;
    }
    .event-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    .event-sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: auto;
        width: 100%;
    }
    .event-count {
        text-align: left;
    }
    .event-count-bar {
        margin-left: 0;
        margin-top: 0;
        width: 60px;
    }
    .event-card-actions {
        flex-wrap: wrap;
        margin-top: 8px;
    }
    .btn-card {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    .event-participants {
        flex-wrap: wrap;
    }
    .btn-text-desktop {
        display: none;
    }
    .btn-text-mobile {
        display: inline;
    }

    /* Admin Event Cards Mobile */
    .admin-event-card {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }
    .admin-event-date {
        min-width: 44px;
        padding: 6px 10px;
    }
    .admin-event-day {
        font-size: 1.25rem;
    }
    .admin-event-info {
        flex: 1 1 calc(100% - 70px);
    }
    .admin-event-meta {
        flex-direction: column;
        gap: 4px;
    }
    .admin-event-actions {
        width: 100%;
        flex-wrap: wrap;
        border-top: 1px solid var(--border-color);
        padding-top: 12px;
        margin-top: 4px;
    }
    .admin-event-actions .btn {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
    }
    .admin-event-actions .btn-danger {
        min-width: auto;
        flex: 0;
    }

    /* Event Detail Mobile Styles - UX Optimized */
    .event-detail-header {
        padding: 20px;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    .event-detail-title {
        font-size: 1.4rem;
        margin-bottom: 12px;
        word-wrap: break-word;
    }
    .event-hero-meta {
        gap: 14px;
    }
    .event-hero-date,
    .event-hero-time {
        font-size: 0.95rem;
    }

    /* Urgency Strip Mobile */
    .event-urgency-strip {
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    .urgency-countdown {
        width: 100%;
        justify-content: space-between;
    }
    .urgency-timer {
        gap: 2px;
    }
    .urgency-block {
        padding: 4px 8px;
        font-size: 1rem;
    }
    .urgency-spots {
        width: 100%;
        justify-content: center;
    }

    /* CTA Section Mobile */
    .event-cta-section {
        flex-direction: column;
        gap: 12px;
        padding: 16px 0;
    }
    .event-cta-main {
        width: 100%;
        flex-direction: column;
    }
    .event-cta-main .btn {
        width: 100%;
    }
    .enrolled-status {
        width: 100%;
        flex-direction: column;
        text-align: center;
    }
    .enrolled-actions {
        width: 100%;
        flex-direction: column;
    }
    .enrolled-actions .btn {
        width: 100%;
    }
    .btn-share {
        width: 100%;
    }
    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }

    /* Social Proof Mobile */
    .event-social-proof {
        padding: 12px 16px;
    }
    .social-proof-avatar {
        width: 32px;
        height: 32px;
        margin-left: -8px;
    }
    .social-proof-text {
        font-size: 0.85rem;
    }

    /* Event Info Card Mobile */
    .event-info-grid {
        grid-template-columns: 1fr;
    }
    .event-info-item-large {
        border-right: none !important;
    }
    .event-info-item-large:last-child {
        border-bottom: none;
    }
    .event-info-icon {
        width: 40px;
        height: 40px;
    }

    /* Rules Accordion Mobile */
    .rules-summary {
        padding: 14px 16px;
    }

    /* Tikkie Payment Card Mobile */
    .tikkie-payment-card {
        padding: 16px !important;
    }
    .tikkie-payment-text {
        font-size: 0.85rem;
    }
    .tikkie-payment-warning {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
    .event-detail-body {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .event-detail-main,
    .event-detail-sidebar {
        width: 100%;
    }
    .participants-grid {
        grid-template-columns: 1fr;
    }

    /* Hide sticky CTA when not needed */
    .sticky-cta:empty {
        display: none;
    }

    /* Hall of Fame Mobile Reordering */
    .hof-main-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    .hof-slider { order: 1; width: 100%; }
    .hof-leaderboard { order: 2; width: 100%; }
    .hof-badges { order: 3; width: 100%; }

    /* Hall of Fame / Leaderboard Mobile Styles */
    .xp-bar {
        padding: 12px 16px;
    }
    .xp-bar-title {
        font-size: 0.9rem;
    }
    .xp-bar-subtitle {
        display: none;
    }
    .hof-leaderboard-container {
        padding: 12px;
    }
    .hof-leaderboard-list {
        max-height: none;
        padding-right: 0;
    }
    .leaderboard-item {
        padding: 10px;
    }
    .leaderboard-row {
        gap: 8px;
    }
    .leaderboard-rank {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    .leaderboard-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.65rem;
    }
    .leaderboard-name {
        font-size: 0.8rem;
    }
    .leaderboard-badges {
        margin-left: 34px;
        margin-top: 6px;
        font-size: 0.7rem;
        gap: 3px;
    }
    .leaderboard-badge-icon {
        width: 22px;
        height: 22px;
    }
    .leaderboard-badge-icon svg {
        width: 14px;
        height: 14px;
    }
    .leaderboard-points {
        font-size: 0.8rem;
    }
    .leaderboard-points span {
        display: none;
    }

    /* Badge Collection Mobile Styles */
    .badge-card-compact {
        padding: 10px;
        gap: 10px;
    }
    .badge-icon-compact {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .badge-name-compact {
        font-size: 0.85rem;
    }
    .badge-desc-compact {
        font-size: 0.75rem;
        white-space: normal;
        line-height: 1.3;
    }
    .badge-count-compact {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    .section-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    .section-card-header {
        margin-bottom: 12px;
    }

    /* Auth Pages Mobile */
    .auth-container {
        margin: 40px auto;
    }
    .auth-container .card {
        padding: 24px;
    }
    .verification-icon,
    .success-icon,
    .error-icon,
    .loading-icon {
        font-size: 48px;
    }

    /* Templates Grid Mobile */
    .templates-grid {
        grid-template-columns: 1fr;
    }

    /* Spelers Page Mobile */
    .spelers-search {
        max-width: 100%;
    }
    .speler-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 10px;
        padding: 16px;
        padding-left: 70px;
        position: relative;
    }
    .speler-rank {
        display: none;
    }
    .speler-avatar {
        position: absolute;
        left: 16px;
        top: 16px;
        width: 44px;
        height: 44px;
    }
    .speler-info {
        grid-column: 1;
    }
    .speler-name {
        font-size: 1rem;
    }
    .speler-stats {
        grid-column: 1;
        justify-content: flex-start;
        gap: 20px;
    }
    .speler-stat {
        text-align: left;
        min-width: auto;
    }
    .speler-stat-value {
        font-size: 1.1rem;
    }
    .speler-badges {
        grid-column: 1;
        justify-content: flex-start;
        min-width: auto;
        gap: 6px;
    }
    .speler-badges-empty {
        display: none;
    }
    .speler-badge {
        width: 28px;
        height: 28px;
    }

    /* Email Settings Mobile */
    #email-settings .form-row {
        flex-direction: column;
    }
    #email-settings .form-row .form-group {
        flex: 1 1 100% !important;
    }

    /* Notification System Mobile */
    .notification-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: auto;
        max-width: 100%;
        border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
        max-height: calc(100vh - 120px);
    }
    .notification-list {
        max-height: calc(100vh - 200px);
    }
    .notification-item {
        padding: 12px 16px;
    }
    .notification-icon {
        width: 36px;
        height: 36px;
    }
    .notification-title {
        font-size: 0.85rem;
    }
    .notification-message {
        font-size: 0.75rem;
    }
    .sidebar-user-row {
        flex-direction: row;
    }
    .sidebar-user-row .user-info {
        flex-direction: row;
        text-align: left;
    }
}

/* Extra small screens (phones < 480px) */
@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .page-subtitle {
        font-size: 0.85rem;
    }

    /* Event Detail Extra Small */
    .event-detail-header {
        padding: 16px;
    }
    .event-detail-title {
        font-size: 1.25rem;
    }
    .event-detail-badges .badge {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    .event-hero-date,
    .event-hero-time {
        font-size: 0.85rem;
    }
    .urgency-block {
        padding: 4px 6px;
        font-size: 0.9rem;
    }
    .urgency-block small {
        font-size: 0.6rem;
    }
    .spots-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .social-proof-avatar {
        width: 28px;
        height: 28px;
    }
    .social-proof-text {
        font-size: 0.8rem;
    }
    .event-info-item-large {
        padding: 14px;
        gap: 12px;
    }
    .event-info-icon {
        width: 36px;
        height: 36px;
    }
    .event-info-value {
        font-size: 0.9rem;
    }
    .rules-summary {
        padding: 12px 14px;
    }
    .rules-summary-content {
        font-size: 0.9rem;
    }

    /* Hall of Fame small screen fixes */
    .hof-leaderboard-container {
        padding: 10px;
    }
    .xp-bar {
        padding: 10px 12px;
    }
    .xp-bar-icon {
        font-size: 1rem;
    }
    .xp-bar-title {
        font-size: 0.85rem;
    }
    .leaderboard-item {
        padding: 8px;
    }
    .leaderboard-row {
        gap: 6px;
    }
    .leaderboard-rank {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    .leaderboard-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.6rem;
    }
    .leaderboard-name {
        font-size: 0.75rem;
    }
    .leaderboard-badges {
        margin-left: 30px;
        font-size: 0.65rem;
    }
    .leaderboard-badge-icon {
        width: 20px;
        height: 20px;
    }
    .leaderboard-badge-icon svg {
        width: 12px;
        height: 12px;
    }

    /* Account Badges small screen */
    .account-badges {
        gap: 8px;
    }
    .account-badge {
        padding: 8px 10px;
    }
    .account-badge-icon {
        width: 26px;
        height: 26px;
    }
    .account-badge-icon svg {
        width: 18px;
        height: 18px;
    }
    .account-badge-name {
        font-size: 0.8rem;
    }
    .badge-lock-icon {
        font-size: 0.6rem;
    }

    /* Spelers Page Extra Small */
    .speler-card {
        padding: 14px;
        padding-left: 60px;
    }
    .speler-avatar {
        width: 38px;
        height: 38px;
        left: 14px;
        top: 14px;
    }
    .speler-name {
        font-size: 0.9rem;
    }
    .speler-stats {
        gap: 16px;
    }
    .speler-stat-value {
        font-size: 1rem;
    }
    .speler-badge {
        width: 24px;
        height: 24px;
    }
    .speler-badge svg {
        width: 14px;
        height: 14px;
    }

    .leaderboard-points {
        font-size: 0.75rem;
    }

    /* Badge Collection small screen fixes */
    .section-card {
        padding: 12px;
    }
    .section-card-header {
        gap: 8px;
    }
    .section-card-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    .section-card-title {
        font-size: 0.95rem;
    }
    .badge-card-compact {
        padding: 8px;
        gap: 8px;
    }
    .badge-icon-compact {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    .badge-name-compact {
        font-size: 0.8rem;
    }
    .badge-desc-compact {
        font-size: 0.7rem;
        white-space: normal;
        line-height: 1.3;
    }
    .badge-count-compact {
        padding: 2px 6px;
        font-size: 0.65rem;
    }

    /* Winner slider small screen */
    .winner-slide img {
        height: 280px;
    }
    .slider-empty {
        height: 150px;
    }
    .winner-slide-overlay {
        padding: 12px;
    }
    .winner-slide-title {
        font-size: 0.95rem;
    }
    .winner-slide-names {
        font-size: 0.8rem;
    }
    .slider-nav {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    .slider-nav.prev {
        left: 8px;
    }
    .slider-nav.next {
        right: 8px;
    }
    .slider-dots {
        padding: 8px;
        gap: 6px;
    }
    .slider-dot {
        width: 6px;
        height: 6px;
    }
    .slider-dot.active {
        width: 18px;
    }
}

/* Contact Page Responsive */
@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* Contact Page */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
.contact-info, .contact-form-container {
    min-width: 0;
}
.contact-reasons {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-reasons li {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.contact-reasons li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.contact-reasons li strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.contact-reasons li p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}
.contact-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}
.contact-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 1rem;
    overflow: hidden;
}
.contact-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.contact-user-name {
    font-weight: 600;
    color: var(--text-primary);
}
.contact-user-email {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.g-recaptcha {
    margin-bottom: 8px;
}

/* iOS Performance Optimizations */
@media (max-width: 768px) {
    /* Re-enable only essential transitions */
    .sidebar {
        transition: transform 0.25s ease;
    }
    .mobile-menu-overlay {
        transition: opacity 0.25s ease;
    }

    /* Disable hover effects on touch devices */
    @media (hover: none) {
        .card:hover,
        .event-card:hover,
        .mp-card:hover,
        .badge-card-compact:hover,
        .leaderboard-item:hover {
            transform: none;
        }
    }

    /* Prevent tap highlight on iOS */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Remove tap delay */
    button, a, [onclick] {
        touch-action: manipulation;
    }
}
