/* ==========================================================================
   Main Container & Layout Styles
   ========================================================================== */
.campaign_container {
    margin: 80px 40px 40px 40px;
}

/* ==========================================================================
   Campaign Card Styles
   ========================================================================== */
.card.campaign-card {
    border-top: 5px solid #0d6efd;
    transition: transform 0.2s ease;
}

.card.campaign-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-title {
    font-weight: 600;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

.commission-value {
    font-weight: bold;
    color: #dc3545;
}

@media (max-width: 768px) {
    .campaign-card .row {
        flex-direction: column;
    }
}

/* ==========================================================================
   Campaign Modal Styles
   ========================================================================== */
.campaign-modal .modal-header {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
}

.campaign-modal .modal-title {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.campaign-modal .modal-body {
    padding: 1.5rem;
}

.campaign-modal .btn-close {
    color: white;
    filter: brightness(0) invert(1);
}

/* ==========================================================================
   Campaign Image & Info Card Styles
   ========================================================================== */
.campaign-image-container {
    position: relative;
    background-color: #f8f9fc;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    text-align: center;
}

.campaign-image {
    max-height: 300px;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.campaign-info-card {
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Campaign Info Header & Body Styles
   ========================================================================== */
.campaign-info-header {
    background-color: #f8f9fc;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.campaign-info-body {
    padding: 1.25rem;
}

.campaign-info-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.campaign-info-item:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Campaign Info Label & Value Styles
   ========================================================================== */
.campaign-info-label {
    font-weight: 600;
    min-width: 140px;
    color: #5a5c69;
    display: flex;
    align-items: center;
}

.campaign-info-label i {
    width: 20px;
    margin-right: 8px;
    color: #4e73df;
}

.campaign-info-value {
    flex: 1;
}

/* ==========================================================================
   Status Badge Styles
   ========================================================================== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.status-inactive {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

/* ==========================================================================
   Modal Footer & Button Styles
   ========================================================================== */
.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 1.5rem;
}

.btn-gradient {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: white;
    border: none;
    transition: all 0.3s;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #3e63cf 0%, #1a3ca6 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(78, 115, 223, 0.25);
    color: white;
}

/* ==========================================================================
   No Campaign Wrapper Styles
   ========================================================================== */
.no-campaign-wrapper {
    padding: 80px 20px;
    min-height: 60vh;
    background: #f9fafc;
    border: 1px dashed #d0d0d0;
    border-radius: 16px;
    animation: fadeIn 0.8s ease-in-out;
    max-width: 800px;
    margin: 0 auto;
}

.empty-img {
    width: 240px;
    max-width: 100%;
    opacity: 0.9;
    animation: floatUp 0.6s ease-out;
}

.no-campaign-guide li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .no-campaign-wrapper {
        padding: 60px 15px;
    }

    .empty-img {
        width: 160px;
    }

    .no-campaign-wrapper h4 {
        font-size: 20px;
    }

    .no-campaign-wrapper p {
        font-size: 15px;
    }

    .no-campaign-guide li {
        font-size: 15px;
    }

    .no-campaign-wrapper .btn {
        font-size: 14px;
        padding: 10px 20px;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatUp {
    0% {
        transform: scale(0.95) translateY(10px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 0.9;
    }
}

/* ==========================================================================
   Selectable Card Styles
   ========================================================================== */
.selectable-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.selectable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(13, 110, 253, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.selectable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: rgba(13, 110, 253, 0.3);
}

.selectable-card:hover::before {
    opacity: 1;
}

.selectable-card.active {
    border-color: #0d6efd;
    background-color: #e7f1ff;
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.15);
    transform: translateY(-3px);
}

.selectable-card.active::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.2) 100%);
}

.selectable-card.active::after {
    content: "✓";
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 20px;
    color: #198754;
    font-weight: bold;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #198754;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Icon styles for selectable cards */
.selectable-card .rounded-circle {
    transition: all 0.3s ease;
}

.selectable-card:hover .rounded-circle {
    transform: scale(1.1);
}

.selectable-card.active .rounded-circle {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Text styles for selectable cards */
.selectable-card h5 {
    transition: color 0.3s ease;
}

.selectable-card:hover h5 {
    color: #0d6efd;
}

.selectable-card.active h5 {
    color: #0d6efd;
}

.selectable-card p {
    transition: color 0.3s ease;
}

.selectable-card:hover p {
    color: #495057;
}

.selectable-card.active p {
    color: #495057;
}

/* ==========================================================================
   Share Modal Styles
   ========================================================================== */
.campaign-modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

.campaign-modal-header {
    background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
    border-bottom: none;
    padding: 20px 25px;
}

.campaign-modal-title {
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
}

.campaign-modal-body {
    padding: 30px;
}

/* ==========================================================================
   Share Icon & Container Styles
   ========================================================================== */
.campaign-share-icon-container {
    background-color: rgba(142, 84, 233, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.campaign-share-icon {
    color: #8E54E9;
    font-size: 32px;
}

.campaign-share-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.campaign-share-subtitle {
    color: #6c757d;
    margin-bottom: 25px;
}

/* ==========================================================================
   Campaign Message Container Styles
   ========================================================================== */
.campaign-message-container {
    background: linear-gradient(135deg, #f8f9fc 0%, #e3f0ff 100%);
    border: 1px solid #e1e5f1;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.campaign-message-header {
    background: linear-gradient(135deg, #8E54E9 0%, #4776E6 100%);
    color: white;
    padding: 12px 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.campaign-message-header i {
    font-size: 0.8rem;
    opacity: 0.9;
}

.campaign-message-content {
    padding: 16px;
    background: white;
}

.campaign-message-content p {
    color: #495057;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
    position: relative;
}

.campaign-message-content .form-control {
    margin-top: 8px;
}

.campaign-message-content p::before {
    content: '"';
    font-size: 1.2rem;
    color: #8E54E9;
    font-weight: bold;
    margin-right: 4px;
}

.campaign-message-content p::after {
    content: '"';
    font-size: 1.2rem;
    color: #8E54E9;
    font-weight: bold;
    margin-left: 4px;
}

/* ==========================================================================
   Copy Input & Button Styles
   ========================================================================== */
.campaign-copy-input-group {
    position: relative;
    margin-bottom: 25px;
}

.campaign-copy-input {
    background-color: #f8f9fc;
    border: 2px solid #e1e5f1;
    border-radius: 12px;
    padding: 15px 20px;
    padding-right: 200px;
    font-size: 16px;
    color: #495057;
    box-shadow: none;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.campaign-copy-input:focus {
    border-color: #8E54E9;
    box-shadow: 0 0 0 3px rgba(142, 84, 233, 0.15);
}

.campaign-action-buttons {
    position: absolute;
    right: 8px;
    top: 8px;
    display: flex;
    gap: 6px;
}

/* ==========================================================================
   Share Button Styles
   ========================================================================== */
.campaign-copy-btn {
    background: linear-gradient(135deg, #4776E6 0%, #8E54E9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.campaign-visit-btn-small {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.campaign-copy-btn:hover,
.campaign-visit-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

.campaign-copy-feedback {
    text-align: center;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 20px;
    height: 24px;
}

/* ==========================================================================
   Share Options Styles
   ========================================================================== */
.campaign-share-options {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.campaign-share-option {
    margin: 0 8px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.campaign-share-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.campaign-option-facebook {
    background-color: #3b5998;
}

.campaign-option-twitter {
    background-color: #1da1f2;
}

.campaign-option-email {
    background-color: #ea4335;
}

.campaign-option-whatsapp {
    background-color: #25d366;
}

/* ==========================================================================
   Modal Footer & Close Button Styles
   ========================================================================== */
.campaign-modal-footer {
    border-top: none;
    padding: 15px 25px;
    background-color: #f8f9fc;
}

.campaign-close-btn {
    background-color: #e9ecef;
    color: #495057;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.campaign-close-btn:hover {
    background-color: #dde1e6;
}

/* ==========================================================================
   Animation Styles
   ========================================================================== */
.campaign-animated {
    animation-duration: 0.5s;
    animation-fill-mode: both;
}

@keyframes campaignFadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.campaign-fade-in-up {
    animation-name: campaignFadeInUp;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media (max-width: 576px) {
    .campaign-copy-input {
        padding-right: 15px;
        margin-bottom: 10px;
    }

    .campaign-action-buttons {
        position: static;
        display: flex;
        width: 100%;
        margin-top: 10px;
        justify-content: space-between;
    }

    .campaign-copy-btn,
    .campaign-visit-btn-small {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}

/* Settings Modal Custom Styles */
#settingsModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.15);
}
#settingsModal .modal-header {
    background: linear-gradient(90deg,rgba(0, 31, 212, 1) 0%, rgba(141, 77, 243, 1) 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    padding: 24px 32px 16px 32px;
}
#settingsModal .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
}
#settingsModal .btn-close-white {
    filter: brightness(0) invert(1);
}
#settingsModal .modal-body {
    background: #f8f9fc;
    padding: 32px;
}
#settingsModal .current-settings {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
}
#settingsModal .current-settings h6 {
    font-weight: 700;
    color: #1a237e;
}
#settingsModal .setting-item label {
    font-size: 0.95rem;
    color: #6c757d;
}
#settingsModal .setting-item .fw-bold {
    font-size: 1.1rem;
    color: #1a237e;
}
#settingsModal .form-check.form-switch .form-check-input {
    width: 3rem;
    height: 1.5rem;
}
#settingsModal .form-label {
    font-weight: 600;
    color: #1a237e;
}
#settingsModal .form-control {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
}
#settingsModal .modal-footer {
    border-top: none;
    background: #f8f9fc;
    border-radius: 0 0 12px 12px;
    padding: 20px 32px;
}
#settingsModal .btn-light {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #1a237e;
    font-weight: 600;
}
#settingsModal .btn-light:hover {
    background: #f1f3f6;
    color: #0d47a1;
}
#settingsModal .btn-gradient, #settingsModal .btn.text-white {
    background: linear-gradient(90deg,rgba(0, 31, 212, 1) 0%, rgba(141, 77, 243, 1) 100%);
    color: #fff !important;
    font-weight: 700;
    border: none;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
#settingsModal .btn-gradient:hover, #settingsModal .btn.text-white:hover {
    background: linear-gradient(90deg,rgba(0, 31, 212, 0.85) 0%, rgba(141, 77, 243, 0.85) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.12);
}
#settingsModal .alert-info {
    background: #e3f0ff;
    color: #1a237e;
    border: none;
    border-radius: 8px;
    font-size: 0.98rem;
    padding: 18px 20px;
}
#settingsModal .alert-heading {
    font-weight: 700;
    color: #1a237e;
}

/* ==========================================================================
   Pagination Styles
   ========================================================================== */
.pagination-info {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.pagination-pages {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
    background: #f8f9fc;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.pagination {
    margin-bottom: 0;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    color: #495057;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.pagination .page-link:hover {
    color: #0d6efd;
    background-color: #e7f1ff;
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.15);
}

.pagination .page-item.active .page-link {
    color: #fff;
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fc;
    border-color: #e9ecef;
    cursor: not-allowed;
}

.pagination .page-link i {
    font-size: 0.8rem;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-info {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .pagination-pages {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .pagination .page-link {
        padding: 6px 8px;
        font-size: 0.9rem;
        min-width: 35px;
    }
    
    .pagination .page-link span {
        display: none;
    }
    
    .pagination .page-link i {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .pagination .page-item {
        margin: 0 1px;
    }
    
    .pagination .page-link {
        padding: 6px 6px;
        min-width: 32px;
        font-size: 0.85rem;
    }
}

/* Settings form alignment */
#settingsModal .settings-form .row.align-items-center > label.col-form-label {
    margin-bottom: 0;
}
#settingsModal .settings-form .form-control {
    height: 42px;
}
@media (min-width: 992px) {
    #settingsModal .current-settings .row > [class*='col-'] .setting-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
    }
}