/* campaign.css - Additional styles for campaign page */

.hidden {
    display: none !important;
}

/* Campaign Grid - Custom 3-column layout to avoid conflicts with styles.css */
.campaign-grid {
    display: grid !important;
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
    margin-bottom: 3rem !important;
}

@media (min-width: 640px) {
    .campaign-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    .campaign-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: linear-gradient(180deg, #1C2526 0%, #151923 100%);
    border-radius: 0.75rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1001;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(243, 186, 47, 0.2);
}

.close-btn {
    background: none;
    border: none;
    color: #A0AEC0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 1002;
}

.close-btn:hover {
    background-color: #F3BA2F;
    color: #0D1117;
}

.modal-body {
    padding: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #F7FAFC;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #4B5563;
    border-radius: 0.5rem;
    background-color: #0D1117;
    color: #F7FAFC;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #F3BA2F;
    box-shadow: 0 0 0 2px rgba(243, 186, 47, 0.2);
}

.form-group input[type="number"] {
    -moz-appearance: textfield; /* Remove Firefox number spinners */
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Remove Chrome number spinners */
    margin: 0;
}

#charCount {
    float: right;
    color: #A0AEC0;
    font-size: 0.875rem;
}

.campaign-card {
    background: linear-gradient(180deg, #1C2526 0%, #151923 100%);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.campaign-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.campaign-card img {
    max-height: 128px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: block; /* Ensure image is displayed */
}

.campaign-card .content {
    flex: 1;
}

.campaign-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #F3BA2F;
    margin-bottom: 0.5rem;
}

.campaign-card p {
    color: #A0AEC0;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.reward-tag {
    display: inline-block;
    background-color: #F3BA2F;
    color: #0D1117;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
}

.status-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-ongoing {
    background-color: #48BB78;
    color: #0D1117;
}

.status-upcoming {
    background-color: #4299E1;
    color: #F7FAFC;
}

.status-ended {
    background-color: #F56565;
    color: #F7FAFC;
}

.dates {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #A0AEC0;
    margin-bottom: 1rem;
}

.join-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #F3BA2F;
    color: #0D1117;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.join-btn:hover {
    background-color: #DAA520;
}

.btn-primary {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.btn-campaign {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.btn-connected {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background-color: #4B5563;
    color: #F7FAFC;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.btn-secondary:hover {
    background-color: #6B7280;
}

/* Override conflicting styles from vendors/styles.css */
.top-section-left .button-grid.grid-cols-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    align-items: center;
}

@media (max-width: 640px) {
    .campaign-card {
        padding: 1rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .top-section-left .button-grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}