/* Campaign Modal Styles */

.campaign-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.campaign-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideUp 0.3s ease-out;
    border: none;
}

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

.campaign-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f5f5f5;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 10000;
    padding: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.campaign-modal-close:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.campaign-modal-header {
    padding: 30px 30px 20px;
    border-bottom: none;
    text-align: center;
}

.campaign-modal-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
    font-weight: 700;
}

.campaign-modal-body {
    padding: 30px;
}

.campaigns-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .campaigns-container {
        grid-template-columns: 1fr;
    }
}

.campaign-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

.campaign-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.campaign-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.campaign-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e8e8e8;
}

.campaign-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.campaign-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.campaign-card-description {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
    flex: 1;
}

.btn-campaign-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    align-self: flex-start;
}

.btn-campaign-link:hover {
    background-color: #c0392b;
    text-decoration: none;
    color: white;
    transform: translateX(5px);
}

.campaign-modal-footer {
    padding: 0 30px 30px;
    text-align: center;
}

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

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    margin-top: 15px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 600px) {
    .campaign-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .campaign-modal-header {
        padding: 20px 20px 15px;
    }

    .campaign-modal-header h2 {
        font-size: 22px;
    }

    .campaign-modal-body {
        padding: 20px;
    }

    .campaigns-container {
        gap: 15px;
    }

    .campaign-card-content {
        padding: 15px;
    }

    .campaign-modal-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
}
