/* ====================================
   INSCRICAO PAGE - MOBILE-FIRST STYLES
   ==================================== */

.price-notice {
    font-size: 12px;
    padding: 3px 8px;
    padding-top: 25px;
    border-radius: 4px;
    display: block;
    text-align: center;
}

.price-notice--late  { background: #fff3e0; color: #e65100; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ee8a04;
    --primary-hover: #d67a03;
    --success-color: #34C759;
    --danger-color: #ef5350;
    --warning-color: #f39c12;
    --dark-bg: #000000;
    --card-bg: #333333;
    --text-light: #ffffff;
    --text-muted: #999999;
    --border-color: #444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ====================================
   LOADING SCREEN
   ==================================== */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#loadingScreen p {
    margin-top: 20px;
    color: var(--text-muted);
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====================================
   ERROR SCREEN
   ==================================== */
#errorScreen,
#fullScreen,
#successScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 20px;
}

.error-container,
.full-container,
.success-container {
    text-align: center;
    max-width: 400px;
}

.error-icon,
.full-icon,
.success-icon {
    margin-bottom: 20px;
}

.error-container h2,
.full-container h2,
.success-container h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.error-container p,
.full-container p {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.full-message,
.success-message {
    color: var(--text-muted);
    margin-top: 20px;
    font-size: 0.95rem;
}

.success-details {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: left;
}

.success-details p {
    margin: 5px 0;
    color: var(--text-light);
}

.btn-back {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* ====================================
   EVENT HEADER
   ==================================== */
.event-header {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.event-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-header-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, transparent 40%, rgba(0,0,0,0.95) 100%);
}

/* ====================================
   FLOATING EVENT CARD
   ==================================== */
.event-card-wrapper {
    padding: 0 10px 20px;
    max-width: 500px;
    margin: -50px auto 0;
    position: relative;
    z-index: 10;
}

.event-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Title */
.event-title-row {
    text-align: center;
}

.event-title-row h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.3;
}

/* Date/Time Line - minimal centered */
.event-datetime {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Price Badge - positioned at top right corner */
.event-price-badge {
    position: absolute;
    top: -12px;
    right: 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff9f2e 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 15px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(238, 138, 4, 0.4);
    z-index: 20;
}

/* Info Pills */
.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pill svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.pill.location {
    flex-basis: 100%;
    background: rgba(238, 138, 4, 0.08);
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s ease;
}

a.pill.location:hover {
    background: rgba(238, 138, 4, 0.15);
}

a.pill.location[href] #eventLocation {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Capacity Section */
.capacity-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
}

.capacity-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    height: 4px;
    border-radius: 4px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #ff9f2e);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.capacity-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.capacity-label span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Event Description */
.event-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ====================================
   REGISTRATION FORM
   ==================================== */
#registrationSection {
    margin-top: 15px;
}

.registration-form-card {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* User Header */
.user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(52, 199, 89, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar svg {
    color: var(--success-color);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-email {
    font-size: 0.9rem;
    color: var(--success-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-menu-wrap {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
}

.account-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.account-menu-btn:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary);
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #1c1c1e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    min-width: 170px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 100;
}

.account-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 0.15s;
}

.account-dropdown-item:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text-primary);
}

.account-dropdown-item.danger {
    color: #ff453a;
}

.account-dropdown-item.danger:hover {
    background: rgba(255,69,58,0.1);
    color: #ff453a;
}

/* Form Layout */
.form-row.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row.two-cols .form-group {
    margin-bottom: 0;
}

/* Messages */
.message {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    display: none;
}

.message.error {
    display: block;
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid rgba(239, 83, 80, 0.3);
    color: #ff6b6b;
}

.message.success {
    display: block;
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: var(--success-color);
}

/* Toggle switch (addon fields) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #444;
    border-radius: 12px;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Override .form-group label specificity for toggle-switch inside addon fields */
.form-group label.toggle-switch {
    display: inline-block;
    text-transform: none;
    letter-spacing: normal;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    margin-bottom: 0;
    gap: 0;
    width: 44px;
    height: 24px;
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group label svg {
    color: var(--primary-color);
    opacity: 0.7;
}

.form-group .required {
    color: var(--danger-color);
    font-weight: 400;
}

.form-group .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.7rem;
    text-transform: none;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    min-height: 48px;
}

.form-group input:hover,
.form-group select:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(238, 138, 4, 0.05);
    box-shadow: 0 0 0 3px rgba(238, 138, 4, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-group select option {
    background: #1a1a1a;
    color: white;
    padding: 10px;
}

.team-search-container {
    position: relative;
}

/* Search input + button row */
.team-search-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.team-search-input-row input {
    flex: 1;
}

/* Inline results panel */
.equipas-results {
    margin-top: 8px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.equipas-list {
    max-height: 260px;
    overflow-y: auto;
}

/* Result item — DetalheEquipa style */
.equipa-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

.equipa-item:last-child {
    border-bottom: none;
}

.equipa-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.equipa-item img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #333;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.equipa-item-info {
    flex: 1;
    min-width: 0;
}

.equipa-item-name {
    font-size: 0.88rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.btn-select-equipa {
    flex-shrink: 0;
    padding: 6px 14px;
    background: rgba(238, 138, 4, 0.12);
    border: 1px solid rgba(238, 138, 4, 0.3);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-select-equipa:hover {
    background: rgba(238, 138, 4, 0.25);
}

.equipa-other-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    background: rgba(238, 138, 4, 0.04);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--primary-color);
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.equipa-other-option:hover {
    background: rgba(238, 138, 4, 0.1);
}

.other-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(238, 138, 4, 0.12);
    border: 1px dashed rgba(238, 138, 4, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Selected Team */
.selected-team {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.2);
    border-radius: 10px;
    margin-top: 10px;
}

.selected-team img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(52, 199, 89, 0.3);
}

.selected-team span {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.clear-team, .cancel-manual {
    width: 28px;
    height: 28px;
    background: rgba(239, 83, 80, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--danger-color);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.clear-team:hover, .cancel-manual:hover {
    background: rgba(239, 83, 80, 0.2);
}

/* Manual Team Input */
.manual-team-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.manual-team-input input {
    flex: 1;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #d67a03 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-height: 52px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(238, 138, 4, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 138, 4, 0.4);
    background: linear-gradient(135deg, #ff9f2e 0%, var(--primary-color) 100%);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(238, 138, 4, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit svg {
    transition: transform 0.3s ease;
}

.btn-submit:hover:not(:disabled) svg {
    transform: translateX(4px);
}

.btn-submit .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* ====================================
   TAB SWITCHER
   ==================================== */
.reg-tabs { display: none; gap: 0; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.reg-tabs.visible { display: flex; }
.reg-tab-btn { flex: 1; padding: 10px 4px; background: transparent; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.reg-tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }

/* ====================================
   TEAM TAB HEADER
   ==================================== */
.team-reg-header { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: rgba(238,138,4,0.08); border: 1px solid rgba(238,138,4,0.2); border-radius: 12px; margin-bottom: 12px; }
.team-reg-header img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(238,138,4,0.3); }
.team-reg-header span { font-size: 0.95rem; font-weight: 600; color: var(--text-light); }
.team-reg-note { font-size: 0.8rem; color: var(--text-muted); margin: 0 0 16px; }

/* ====================================
   TEAM MEMBER CARDS
   ==================================== */
.team-member-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; margin-bottom: 10px; overflow: hidden; transition: border-color 0.2s; }
.team-member-card.selected { border-color: rgba(238,138,4,0.4); background: rgba(238,138,4,0.04); }
.member-card-top { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.member-checkbox { width: 18px; height: 18px; accent-color: var(--primary-color); flex-shrink: 0; cursor: pointer; }
.member-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #333; }
.member-name { font-size: 0.9rem; font-weight: 600; color: var(--text-light); }
.member-email { font-size: 0.75rem; color: var(--text-muted); }
.member-fields { padding: 0 14px 14px; }
.team-empty-msg { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 24px 0; }
.team-member-card.registered { border-color: rgba(52,199,89,0.25); background: rgba(52,199,89,0.04); }
.member-registered-badge { font-size: 0.72rem; font-weight: 600; color: var(--success-color); background: rgba(52,199,89,0.12); border: 1px solid rgba(52,199,89,0.25); border-radius: 20px; padding: 3px 10px; white-space: nowrap; flex-shrink: 0; }

/* ====================================
   SMALL MOBILE (below 380px)
   ==================================== */
@media (max-width: 379px) {
    .form-row.two-cols {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .form-row.two-cols .form-group {
        margin-bottom: 0;
    }

    .event-price-badge {
        right: 15px;
        font-size: 0.65rem;
        padding: 4px 8px;
    }
}

/* ====================================
   TABLET AND UP
   ==================================== */
@media (min-width: 768px) {
    .event-header {
        height: 220px;
    }

    .event-card-wrapper {
        max-width: 550px;
    }

    .event-card {
        padding: 24px;
    }

    .event-title-row h1 {
        font-size: 1.3rem;
    }

    .info-pills {
        gap: 10px;
    }

    .pill {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .registration-form-card {
        padding: 24px;
    }

    .form-group input,
    .form-group select {
        padding: 14px 16px;
    }
}

/* ====================================
   DESKTOP
   ==================================== */
@media (min-width: 1024px) {
    .event-header {
        height: 280px;
    }

    .event-card-wrapper {
        max-width: 600px;
        margin-top: -70px;
    }

    .event-card {
        padding: 28px;
    }

    .event-title-row h1 {
        font-size: 1.5rem;
    }

    .event-price-badge {
        font-size: 0.85rem;
        padding: 6px 14px;
        right: 35px;
    }

    .registration-form-card {
        padding: 28px;
    }
}

.full-event-notice {
    background: #2a1f00;
    border: 1px solid #f39c12;
    color: #f39c12;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.9em;
    text-align: center;
}

.desc-toggle-btn {
    display: inline-block;
    margin-top: 6px;
    background: none;
    border: none;
    color: #f5a623;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.desc-toggle-btn:hover {
    color: #ffbe55;
}

/* ============================================
   DESCRIPTION SUPPORT IMAGES + LIGHTBOX
   ============================================ */
.desc-support-images {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.desc-support-img {
    width: auto;
    max-width: 100%;
    border-radius: 8px;
    cursor: pointer;
    object-fit: contain;
    max-height: 180px;
    display: block;
}
.img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    display: flex;
}
.img-lightbox-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
}
.img-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
    border-radius: 8px;
    position: relative;
}
.img-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* ============================================
   SUPPORT BUTTON (fixed top-right)
   ============================================ */
.support-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2900;
    width: auto;
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    border: none;
    background: #ee8a04;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(238,138,4,0.45);
    transition: transform 0.15s, box-shadow 0.15s;
}
.support-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 18px rgba(238,138,4,0.6);
}
.support-btn:active {
    transform: scale(0.95);
}

.support-popover {
    position: fixed;
    top: 66px;
    right: 16px;
    z-index: 2900;
    background: #1c1c1e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 12px 12px 10px;
    min-width: 220px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.6);
    display: none;
    flex-direction: column;
    gap: 4px;
}
.support-popover.show {
    display: flex;
}
.support-popover-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.3);
    margin: 0 0 6px 2px;
}
.support-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 4px 0;
}
.support-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.support-option:hover {
    background: rgba(255,255,255,0.06);
}
.support-option--premium {
    background: linear-gradient(135deg, rgba(26,18,0,0.6), rgba(42,24,0,0.6));
    border: 1px solid rgba(238,138,4,0.25);
}
.support-option--premium:hover {
    background: linear-gradient(135deg, rgba(36,24,0,0.8), rgba(52,32,0,0.8));
}
.support-option--premium-unlocked {
    border: 1px solid rgba(255,255,255,0.06);
}
.support-option--premium-unlocked .support-option-icon {
    background: rgba(238,138,4,0.15);
    color: #ee8a04;
}
.support-option-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.support-option--premium .support-option-icon {
    background: rgba(238,138,4,0.15);
    color: #ee8a04;
}
.support-option-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.support-option-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}
.support-option-sub {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.4);
    line-height: 1.3;
}
.support-option-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #ee8a04;
    white-space: nowrap;
    flex-shrink: 0;
}


/* ============================================
   FREE REGISTRATION TOGGLE
   ============================================ */
.free-reg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(76,175,80,0.07);
    border: 1px solid rgba(76,175,80,0.25);
    border-radius: 10px;
    padding: 11px 14px;
}
.free-reg-text { display: flex; flex-direction: column; gap: 2px; }
.free-reg-label { font-size: 0.88rem; font-weight: 600; color: #81c784; }
.free-reg-hint { font-size: 0.72rem; color: rgba(255,255,255,0.4); line-height: 1.3; }
.free-reg-toggle {
    position: relative;
    display: inline-block;
    width: 42px; height: 24px;
    flex-shrink: 0; cursor: pointer;
}
.free-reg-toggle input { opacity: 0; width: 0; height: 0; }
.free-reg-slider {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 24px;
    transition: background 0.2s;
    cursor: pointer;
}
.free-reg-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: white; border-radius: 50%;
    transition: transform 0.2s;
}
.free-reg-toggle input:checked + .free-reg-slider { background: #4CAF50; }
.free-reg-toggle input:checked + .free-reg-slider::before { transform: translateX(18px); }

/* ============================================
   CONSENT CHECKBOX
   ============================================ */
.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    transition: border-color 0.2s;
}
.consent-row:hover { border-color: rgba(255,255,255,0.18); }
.consent-row input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px; height: 16px;
    accent-color: var(--primary-color, #ee8a04);
    cursor: pointer;
}
.consent-text {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
}
.consent-row.consent-required {
    border-color: #EF5350;
    background: rgba(239,83,80,0.07);
}
.consent-row.consent-required .consent-text { color: #ef9a9a; }

/* ── Equipas inscritas ── */
#registeredTeamsSection {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #222;
}
@keyframes teamShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.reg-teams-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.reg-teams-title {
    font-size: 13px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.reg-teams-premium-link {
    font-size: 11px;
    color: #ee8a04;
    text-decoration: none;
    font-weight: 600;
}
.reg-teams-premium-link:hover { text-decoration: underline; }
.reg-teams-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}
.reg-team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 52px;
}
.reg-team-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: #1e1e1e;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2a2a2a;
}
.reg-team-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.reg-team-initial {
    font-size: 16px;
    font-weight: 700;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.reg-team-name {
    font-size: 10px;
    color: #aaa;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52px;
}
.reg-team-name-blur {
    filter: blur(4px);
    user-select: none;
}
.reg-team-circle-blur {
    filter: blur(0px);
    pointer-events: none;
}

/* Clickable team cards (premium) */
.reg-team-card-clickable {
    cursor: pointer;
    border-radius: 8px;
    padding: 4px;
    transition: background 0.15s;
}
.reg-team-card-clickable:hover {
    background: rgba(255,255,255,0.06);
}
.reg-team-card-clickable.active .reg-team-circle {
    border-color: var(--secondary-color, #ee8a04);
    box-shadow: 0 0 0 2px rgba(238,138,4,0.35);
}
.reg-team-card-clickable.active .reg-team-name {
    color: var(--secondary-color, #ee8a04);
}

/* Players panel */
.reg-team-players-panel {
    margin-top: 12px;
    border-top: 1px solid #222;
    padding-top: 12px;
}
.reg-players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.reg-player-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 56px;
    text-decoration: none;
    cursor: pointer;
}
.reg-player-item:hover .reg-player-avatar {
    border-color: var(--secondary-color, #ee8a04);
}
.reg-player-item:hover .reg-player-name {
    color: #fff;
}
.reg-player-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #333;
    transition: border-color 0.15s;
}
.reg-player-name {
    font-size: 10px;
    color: #aaa;
    font-weight: 500;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 56px;
    transition: color 0.15s;
}
.reg-players-empty {
    font-size: 0.82rem;
    color: #555;
    text-align: center;
    padding: 8px 0;
}
.reg-players-shimmer {
    display: flex;
    gap: 10px;
}
.reg-player-skel {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(90deg, #222 25%, #2a2a2a 50%, #222 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

.ver-jogadores-btn {
    background: none;
    border: 1px solid #444;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
    padding: 7px 16px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.ver-jogadores-btn:hover {
    border-color: var(--secondary-color, #ee8a04);
    color: #fff;
}

/* Auto-fill premium banner */
.autofill-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    margin-bottom: 12px;
    border-radius: 9px;
    border: 1px solid #ee8a04;
}
.autofill-banner--locked {
    background: linear-gradient(135deg, #1a1200, #2a1800);
    opacity: 0.9;
}
.autofill-banner--done {
    background: linear-gradient(135deg, #0d1a0d, #122012);
    border-color: #34c759;
}
.autofill-banner-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.autofill-banner-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.autofill-banner-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}
.autofill-banner-desc {
    font-size: 0.72rem;
    color: #888;
    margin-top: 2px;
    line-height: 1.3;
}
.autofill-banner-badge {
    flex-shrink: 0;
    border-radius: 6px;
    color: #ee8a04;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 9px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.autofill-banner--locked {
    cursor: pointer;
}
.autofill-banner-done-badge {
    flex-shrink: 0;
    background: rgba(52,199,89,0.12);
    border: 1px solid rgba(52,199,89,0.4);
    border-radius: 6px;
    color: #34c759;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 9px;
    white-space: nowrap;
}

