/* ========================================
   THEME BLACK - BLACK FRIDAY VIP
   Theme exclusivo para página VIP Black Friday
   Sem dependências de Materialize CSS
   ======================================== */

/* ========================================
   RESET & BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    --black: #000000;
    --dark-gray: #1a1a1a;
    --medium-gray: #2d2d2d;
    --light-gray: #f5f5f5;
    --orange: #ff6b00;
    --red: #ff0000;
    --dark-red: #cc0000;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --text-dark: #333333;
    --text-light: #666666;
    --border-light: #e0e0e0;
}

/* ========================================
   BODY & MAIN LAYOUT
   ======================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark-gray) 50%, var(--medium-gray) 100%);
    color: var(--white);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

a {
    color: var(--orange);
    text-decoration: none;
    transition: color 0.3s ease;
    text-decoration: underline;
}

a:hover, a:focus, a:active {
    color: var(--red);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 107, 0, 0.1), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 40px);
    padding: 20px 0;
}

.content-box {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ========================================
   LOGO
   ======================================== */

.logo-container {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

.logo-container img {
    max-width: 200px;
    height: auto;
}

/* ========================================
   CONTENT BOX
   ======================================== */

.content-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 80px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease;
    color: var(--text-dark);
}

/* ========================================
   BLACK FRIDAY BANNER
   ======================================== */

.black-friday-banner {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--medium-gray) 100%);
    color: var(--white);
    padding: 30px 20px;
    border-radius: 0 80px 0 80px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
    text-align: center;
}

.black-friday-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shine 3s infinite;
}

.bf-badge {
    display: inline-block;
    background: linear-gradient(45deg, var(--orange), var(--red));
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    margin: 0 auto 10px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

.bf-title {
    margin: 10px 0 20px;
    font-size: 24px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* ========================================
   COUNTDOWN TIMER
   ======================================== */

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px 20px;
    min-width: 80px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.countdown-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--orange);
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.countdown-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #ccc;
    margin-top: 5px;
    font-weight: 600;
}

/* ========================================
   SECTION TITLE
   ======================================== */

.section-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 30px 0 20px;
}

/* ========================================
   PLANS CONTAINER
   ======================================== */

.plans {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 25px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   VIP PLAN CARD
   ======================================== */

.vip-plan-card {
    position: relative;
    display: block;
    background: var(--white);
    border: 3px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: visible;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.vip-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--orange);
}

.vip-plan-card.almost-sold-out {
    border-color: var(--red);
    background: linear-gradient(to bottom, #fff 0%, #fff9f9 100%);
    animation: pulse-border 2s infinite;
}

/* Radio Button Custom */
.vip-plan-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vip-plan-card input[type="radio"]:checked ~ .plan-content {
    color: inherit;
}

.vip-plan-card input[type="radio"] + .plan-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 3px solid #9e9e9e;
    border-radius: 50%;
    background: var(--white);
    transition: all 0.3s ease;
}

.vip-plan-card input[type="radio"]:checked + .plan-content::before {
    border-color: var(--orange);
    background-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.vip-plan-card input[type="radio"]:checked + .plan-content::after {
    content: '✓';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
    font-size: 14px;
    font-weight: 800;
}

/* Plan Content Layout */
.plan-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-left: 40px;
    position: relative;
    gap: 20px;
}

.plan-info {
    flex: 1;
    min-width: 0;
}

.plan-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}

/* ========================================
   BADGES
   ======================================== */

.discount-badge {
    position: absolute;
    top: -34px;
    right: -34px;
    background: linear-gradient(135deg, var(--red), var(--dark-red));
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    z-index: 10;
    animation: badge-pulse 2s infinite;
}

.urgency-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 5px;
    animation: blink 1.5s infinite;
}

/* ========================================
   PRICES
   ======================================== */

.price-container {
    text-align: center;
    min-width: 150px;
}

.original-price {
    display: block;
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
    margin-bottom: -10px;
    font-weight: 500;
}

.current-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.current-price .currency {
    font-size: 16px;
    font-weight: 700;
    color: var(--orange);
}

.current-price .price {
    font-size: 28px;
    font-weight: 800;
    color: var(--orange);
}

/* ========================================
   SLOTS INFO
   ======================================== */

.slots-info {
    min-width: 180px;
    text-align: center;
}

.slots-bar-container {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.slots-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--red) 0%, var(--orange) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.almost-sold-out .slots-bar {
    animation: pulse-bar 1.5s infinite;
}

.slots-text {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

.almost-sold-out .slots-text {
    color: var(--red);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: var(--white);
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid #ddd;
}

.btn-secondary:hover {
    border-color: #999;
    color: var(--text-dark);
}

/* ========================================
   HELPER TEXT
   ======================================== */

.helper-text {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-top: 10px;
}

/* ========================================
   MESSAGES
   ======================================== */

.message {
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
}

.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   AJAX RESPONSE
   ======================================== */

.ajax_response {
    margin: 20px 0;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes pulse-border {
    0%, 100% {
        border-color: var(--red);
        box-shadow: 0 0 0 rgba(255, 0, 0, 0);
    }
    50% {
        border-color: var(--orange);
        box-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
    }
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes pulse-bar {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .content-box {
        padding: 25px 20px;
    }

    .bf-title {
        font-size: 18px;
    }

    .countdown-item {
        min-width: 60px;
        padding: 10px 15px;
    }

    .countdown-value {
        font-size: 24px;
    }

    .plan-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .price-container,
    .slots-info {
        min-width: 100%;
        text-align: left;
    }

    .current-price {
        justify-content: flex-start;
    }

    .current-price .price {
        font-size: 24px;
    }

    .discount-badge {
        top: -8px;
        right: -8px;
        padding: 6px 12px;
        font-size: 14px;
    }

    .plan-title {
        font-size: 18px;
    }

    .section-title {
        font-size: 22px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 480px) {
    .black-friday-banner {
        padding: 20px 15px;
    }

    .bf-title {
        font-size: 16px;
    }

    .countdown-timer {
        gap: 8px;
    }

    .countdown-item {
        min-width: 50px;
        padding: 8px 10px;
    }

    .countdown-value {
        font-size: 20px;
    }

    .countdown-label {
        font-size: 10px;
    }

    .vip-plan-card {
        padding: 15px;
    }

    .plan-content {
        padding-left: 35px;
    }

    .vip-plan-card input[type="radio"] + .plan-content::before {
        width: 20px;
        height: 20px;
    }

    .vip-plan-card input[type="radio"]:checked + .plan-content::after {
        left: 5px;
        font-size: 12px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.form-input:read-only {
    background: #f9f9f9;
    cursor: not-allowed;
}

/* ========================================
   SELECT (custom)
   ======================================== */

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(135deg, var(--white), var(--white)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><polyline points="5,7 10,12 15,7" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat, no-repeat;
    background-position: left top, right 12px center;
    background-size: auto, 16px;
}

.form-select:hover {
    border-color: #c8c8c8;
}

.form-select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Fix para option placeholder */
.form-select option[disabled][selected] { color: #999; }

/* === Black theme select fixes & compat overrides === */
.form-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background-color: var(--white);
    color: var(--text-dark);
    transition: all 0.3s ease;
}
.form-select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}
/* Ensure native select shows even if wrapped by Materialize */
.select-wrapper .form-select { display: block !important; }
/* Hide Materialize-generated dropdown elements inside black theme */
.select-wrapper > input.select-dropdown,
.select-wrapper > .caret,
ul.dropdown-content.select-dropdown { display: none !important; }
ul.dropdown-content.select-dropdown { list-style: none !important; }
/* Invalid state */
.form-select.invalid { border-color: #c62828; box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.12); }

/* ========================================
   TOASTS (compatível com Materialize)
   ======================================== */

/* Materialize toast container */
#toast-container {
    position: fixed;
    z-index: 2000;
    top: 10%;
    right: 2%;
}

#toast-container .toast {
    background: #323232;
    color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Variantes (se usadas) */
.toast.success { background: #2e7d32; }
.toast.error { background: #c62828; }
.toast.warning { background: #ed6c02; }
.toast.info { background: #1565c0; }

/* ========================================
   SWEETALERT2 COMPATIBILIDADE VISUAL
   ======================================== */

/* Ajustes leves para alinhar com o tema */
.swal2-popup {
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35) !important;
}

.swal2-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 800 !important;
}

.swal2-html-container {
    font-family: 'Inter', sans-serif !important;
}

.swal2-styled.swal2-confirm {
    background: linear-gradient(135deg, var(--orange), var(--red)) !important;
    border: none !important;
    border-radius: 8px !important;
}

.swal2-styled.swal2-cancel {
    background: #eee !important;
    color: #333 !important;
    border-radius: 8px !important;
}

/* Botões lado a lado responsivos */
.swal2-actions { gap: 10px !important; }

/* ========================================
   UTILIDADES DE Z-INDEX
   ======================================== */

/* Garantir que o toast e o WhatsApp fiquem acima do conteúdo */
#toast-container { z-index: 3000; }
.whatsapp-button { z-index: 2500; }

/* ========================================
   HIDE UTILITY
   ======================================== */

.hide {
    display: none !important;
}

/* ========================================
   TEXT TRANSFORM UTILITIES
   ======================================== */

.uppercase {
    text-transform: uppercase;
}

.lowercase {
    text-transform: lowercase;
}

/* ========================================
   BUTTONS - VARIANTS
   ======================================== */

.btn-link {
    background: none;
    color: var(--text-light);
    padding: 10px 20px;
    border: none;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--text-dark);
    transform: none;
    box-shadow: none;
}

/* Action buttons group */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .action-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

/* ========================================
   WHATSAPP FLOAT BUTTON
   ======================================== */

.whatsapp-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}

.whatsapp-button:active {
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .whatsapp-button {
        right: 15px;
        bottom: 15px;
        width: 52px;
        height: 52px;
    }
}

/* === Layout centering improvements === */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 40px);
    padding: 20px 0;
}

.content-box {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* Constrain single plan card width for better readability */
.vip-plan-card { max-width: 860px; margin-left: auto; margin-right: auto; }

/* Tighten section header spacing */
.section-header { text-align: center; margin: 10px 0 20px; }

/* Plans container narrow variant (auto) */
.plans { max-width: 900px; margin-left: auto; margin-right: auto; }

/* === Switch UI polish === */
.switch { width: 64px; height: 34px; }
.switch-slider { background-color: #d6d6d6; }
.switch-slider:before { height: 26px; width: 26px; left: 4px; bottom: 4px; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.switch input:checked + .switch-slider { background: linear-gradient(135deg, var(--orange), var(--red)); }
.switch input:focus + .switch-slider { box-shadow: 0 0 0 4px rgba(255,107,0,0.3); }
.switch-label { font-size: 14px; font-weight: 700; }
.switch-container { gap: 12px; }

/* Form spacing tune */
.form-group { margin-bottom: 18px; }

/* Helper text alignment */
.form-helper { margin-top: 6px; }

/* ========================================
   SWITCH / TOGGLE
   ======================================== */

.switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: background-color 0.4s;
    border-radius: 30px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: transform 0.4s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background: linear-gradient(135deg, var(--orange), var(--red));
}

input:checked + .switch-slider:before {
    transform: translateX(26px);
}

/* ========================================
   DETAILS SECTION & BENEFITS BUTTON
   ======================================== */

.details-section {
    text-align: center;
    margin: 30px 0;
    padding: 30px 0;
    border-top: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
}

.btn-benefits {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 35px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    color: var(--text-dark);
    border: 2px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
}

.btn-benefits:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: var(--orange);
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
}

.btn-benefits .emoji {
    font-size: 20px;
}

.security-note {
    margin: 15px 0;
    color: grey;
    font-size: 12px;
    text-align: center;
}
