/* ========== DAFTAR.CSS - Form Registration Styling ========== */
/* Note: Header & Footer styling ada di assets/css/style.css */

body {
    background: #e0f7fa;
}

.main-content {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    min-height: calc(100vh - 200px);
}

.form-container {
    max-width: 90%;
    margin: 30px auto;
    background: #fff;
    padding: 32px 28px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .form-container {
        max-width: 650px;
        width: 100%;
    }
}

/* ========== BADGE ========== */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}

.badge-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-inactive {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge-batch {
    background: #e8f4fd;
    color: #1a6fa8;
    border: 1px solid #b3d9f5;
}

.event-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========== EVENT SELECTION ========== */
.event-selection-wrapper {
    width: 100%;
}

.event-selection-wrapper h2 {
    text-align: center;
    color: #0b3952;
    margin-bottom: 10px;
}

.event-selection-wrapper .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.event-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #0b3952;
    font-size: 1.1rem;
}

/* ========== EVENT CARD ========== */
.event-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card:hover:not(.disabled) {
    border-color: #0b3952;
    box-shadow: 0 4px 12px rgba(11, 57, 82, 0.15);
    transform: translateY(-2px);
}

.event-card.selected {
    border-color: #0b3952;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(11, 57, 82, 0.2);
}

.event-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Header: judul di atas, badge di bawahnya */
.event-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-title {
    color: #0b3952;
    font-size: 1.15rem;
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
}

/* Info row: tanggal & lokasi sejajar */
.event-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.event-date,
.event-location {
    color: #555;
    font-size: 0.88rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-date i,
.event-location i {
    color: #0b3952;
    font-size: 0.85rem;
}

.event-actions {
    margin-top: 4px;
}

.btn-select-event {
    width: 100%;
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-select-event:not(:disabled) {
    background: #0b3952;
    color: #fff;
}

.btn-select-event:not(:disabled):hover {
    background: #082c42;
    transform: translateY(-1px);
}

.btn-select-event:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

/* ========== SELECTED EVENT INFO ========== */
.selected-event-info {
    margin-top: 30px;
    padding: 20px;
    background: #f0f8ff;
    border: 2px solid #0b3952;
    border-radius: 12px;
}

.selected-event-info h3 {
    color: #0b3952;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.selected-event-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.selected-event-card h4 {
    color: #0b3952;
    margin: 0 0 10px 0;
}

.selected-event-card p {
    color: #666;
    margin: 0;
}

.btn-proceed {
    width: 100%;
    padding: 14px 20px;
    background: #0b3952;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-proceed:hover {
    background: #082c42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 57, 82, 0.3);
}

/* ========== NO EVENTS / ERROR ========== */
.no-events-message,
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-events-message i,
.error-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #0b3952;
    display: block;
}

.no-events-message p,
.error-message p {
    margin: 10px 0;
}

.no-events-message .small {
    font-size: 0.9rem;
    color: #999;
}

.btn-retry {
    margin-top: 15px;
    padding: 10px 20px;
    background: #0b3952;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* ========== CLOSED MESSAGE ========== */
.closed-message-wrapper {
    text-align: center;
    padding: 40px 20px;
}

.closed-icon {
    margin-bottom: 20px;
}

.closed-icon i {
    font-size: 4rem;
    color: #721c24;
    background: #f8d7da;
    padding: 30px;
    border-radius: 50%;
}

.closed-message-wrapper h2 {
    color: #721c24;
    margin-bottom: 20px;
}

.closed-message-wrapper p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 15px auto;
    max-width: 500px;
}

.closed-message-wrapper .social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 30px auto;
}

.closed-message-wrapper .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.closed-message-wrapper .social-link.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
    color: #fff;
}

.closed-message-wrapper .social-link.instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
}

.closed-message-wrapper .social-link.tiktok {
    background: #000;
    color: #fff;
}

.closed-message-wrapper .social-link.tiktok:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-back-to-events {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 12px 24px;
    background: #0b3952;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back-to-events:hover {
    background: #082c42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 57, 82, 0.3);
}

/* ========== FORM STYLES ========== */
h2 {
    text-align: center;
    color: #0b3952;
    line-height: 1.5;
}

h3 {
    color: #0b3952;
    margin-top: 20px;
    margin-bottom: 8px;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

input[type=text],
input[type=date],
input[type=email],
input[type=url],
input[type=file],
input[type=tel],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
}

textarea {
    height: 100px;
    resize: vertical;
}

.referral-status {
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 10px;
    display: block;
}

.referral-status.valid  { color: #28a745; }
.referral-status.invalid { color: #dc3545; }

button[type=submit] {
    width: 100%;
    background: #0b3952;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

button[type=submit]:hover    { background: #082c42; }
button[type=submit]:disabled { opacity: 0.6; cursor: not-allowed; }

#form-content.disabled,
#form-content-event-2.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.form-check {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input { width: auto; }

.social-rules {
    padding: 18px 20px;
    border-radius: 8px;
    margin-top: 4px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    background: #f0f8ff;
}

.social-rules p {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-rules p .fab {
    font-size: 20px;
    width: 20px;
    text-align: center;
}

.social-rules p .fa-instagram { color: #E1306C; }
.social-rules p .fa-tiktok    { color: #000000; }

.payment-card,
.upload-card {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    margin-bottom: 25px;
}

.payment-card {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.upload-card {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ========== CONFIRMATION CARD ========== */
.confirmation-card-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex !important;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.confirmation-card-wrapper.show {
    opacity: 1 !important;
    visibility: visible !important;
}

.confirmation-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.no-pendaftaran-container {
    background-color: #0b3952;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
    margin: 15px 0;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.whatsapp-btn {
    width: 100%;
    background-color: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.whatsapp-btn:hover { background-color: #128c7e; }

.whatsapp-btn .fab.fa-whatsapp {
    font-size: 24px;
}

/* ========== PHONE INPUT ========== */
.phone-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.phone-input-group .country-code {
    width: 70px;
    flex-shrink: 0;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    background-color: #f3f4f6;
    text-align: center;
    font-weight: 600;
    color: #4b5563;
    pointer-events: none;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-input-group input[type=tel] {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
    width: auto;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    margin-bottom: 0;
    height: 44px;
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 600px) {
    .main-content {
        padding: 15px 10px;
    }

    .form-container {
        margin: 15px auto;
        padding: 20px 15px;
    }

    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }

    .event-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .closed-icon i {
        font-size: 3rem;
        padding: 20px;
    }

    .social-links {
        max-width: 100%;
    }
}

/* ========== TUTORIAL BUTTON ========== */
.btn-tutorial {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 12px;
    background: #dc3545;
    color: #fff !important;
    border-radius: 5px;
    font-size: 0.82em;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-tutorial:hover {
    background: #b02a37;
}

/* ========== PAYMENT CARD WITH IMAGE ========== */
.payment-info-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.payment-info-text {
    flex: 1;
}

.payment-qr-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.payment-qr-img {
    width: 85px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #ffc107;
    display: block;
}

/* ========== DOWNLOAD QR BUTTON ========== */
.btn-download-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 10px;
    background: #28a745;
    color: #fff !important;
    border-radius: 6px;
    font-size: 0.78em;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}
.btn-download-qr:hover {
    background: #1e7e34;
}

@media (max-width: 400px) {
    .payment-info-row {
        flex-direction: column;
    }
    .payment-qr-img {
        width: 100%;
        max-width: 180px;
    }
}


/* ========== ESSAY SECTIONS ========== */
.essay-section {
    margin-bottom: 20px;
}

.essay-title {
    font-weight: 700;
    color: #0b3952;
    font-size: 1rem;
    margin-bottom: 5px;
}

.essay-hint {
    display: block;
    color: #555;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #0b3952;
    border-radius: 0 6px 6px 0;
}

.essay-section textarea {
    margin-bottom: 0;
}

/* ========== QR PREVIEW MODAL ========== */
.qr-modal-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}

.qr-modal-wrapper.show {
    opacity: 1;
    visibility: visible;
}

.qr-modal-box {
    background: #fff;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    max-width: 320px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-modal-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0b3952;
    margin: 0;
}

.qr-modal-img {
    width: 100%;
    max-width: 260px;
    height: auto;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    display: block;
}

.qr-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.qr-btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: #28a745;
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s;
}

.qr-btn-download:hover { background: #1e7e34; }

.qr-btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: #f0f0f0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.qr-btn-back:hover { background: #e0e0e0; }

@media (max-width: 400px) {
    .qr-modal-box {
        padding: 18px 14px;
    }
}