/* Facebook CRM Module Styles */
body {
    background-color: #f8f9fa;
    padding: 20px;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.03);
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* DataTable Customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 1rem;
}

/* Stats Cards */
.card.text-white {
    transition: transform 0.2s;
}

.card.text-white:hover {
    transform: translateY(-5px);
}

/* Refresh Button */
#refresh-data {
    transition: all 0.2s;
}

#refresh-data:hover {
    background-color: #6c757d;
    color: white;
}

/* Table Styles */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
}

/* Loading States */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        margin-bottom: 0;
    }
}

/* Layout Adjustments for Sidebar */
body.sidebar-left-open .main-content-wrapper {
    margin-left: 250px; /* Adjust based on your sidebar's open width */
}

body.sidebar-left-collapsed .main-content-wrapper {
    margin-left: 50px; /* Adjust based on your sidebar's collapsed width */
} 

    :root {
        --primary-blue: #4267B2;
        --dark-blue: #1a237e;
        --light-blue: #e9f0fb;
        --success-green: #28a745;
        --danger-red: #dc3545;
        --warning-orange: #ffc107;
    }
    
    body {
        background-color: #f8f9fa;
        font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    }
    
    .integration-container {
        max-width: 1000px;
        margin: 2rem auto;
        padding: 2rem;
        background: white;
        border-radius: 10px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .integration-header {
        text-align: center;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #eee;
    }
    
    .integration-header i {
        font-size: 3.5rem;
        color: var(--primary-blue);
        margin-bottom: 1rem;
    }
    
    .integration-header h2 {
        color: var(--dark-blue);
        font-weight: 600;
    }
    
    .integration-header p {
        color: #6c757d;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .login-section, .pages-section, .subscription-section {
        margin-bottom: 2rem;
        padding: 1.5rem;
        background: var(--light-blue);
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .pages-section, .subscription-section {
        display: none;
    }
    
    .section-title {
        color: var(--dark-blue);
        margin-bottom: 1.5rem;
        font-weight: 600;
        display: flex;
        align-items: center;
    }
    
    .section-title i {
        margin-right: 10px;
    }
    
    #fb-login {
        background-color: var(--primary-blue);
        border: none;
        padding: 12px 24px;
        font-size: 2rem;
        font-weight: 500;
        border-radius: 6px;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color:white
    }
    
    #fb-login:hover {
        background-color: #365899;
        transform: translateY(-2px);
    }
    
    #fb-login i {
        font-size: 1.2rem;
        margin-right: 8px;
    }
    
    #status {
        margin-top: 1rem;
    }
    
    .alert {
        border-radius: 6px;
        padding: 12px 16px;
    }
    
    .page-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        margin-bottom: 10px;
        background: white;
        border-radius: 6px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        transition: all 0.2s ease;
    }
    
    .page-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    .page-info h5 {
        margin-bottom: 4px;
        color: #333;
        font-weight: 600;
        font-size: 1rem;
    }
    
    .page-info small {
        color: #6c757d;
        font-size: 0.9rem;
    }
    
    .btn-select {
        background-color: var(--primary-blue);
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        font-size: 0.875rem;
        transition: all 0.2s ease;
    }
    
    .btn-select:hover {
        background-color: #365899;
    }
    
    .selected-page-card {
        background: white;
        padding: 1.5rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin-bottom: 1.5rem;
    }
    
    .selected-page-title {
        font-weight: 600;
        color: var(--dark-blue);
        margin-bottom: 0.5rem;
    }
    
    .selected-page-id {
        color: #6c757d;
        font-size: 0.875rem;
    }
    
    #subscribe-webhook-btn {
        background-color: var(--success-green);
        border: none;
        padding: 10px 20px;
        font-weight: 500;
        border-radius: 6px;
        transition: all 0.3s ease;
    }
    
    #subscribe-webhook-btn:hover {
        background-color: #218838;
        transform: translateY(-2px);
    }
    
    .subscription-message {
        background: white;
        padding: 1rem;
        border-radius: 6px;
        margin-bottom: 1rem;
    }
    
    .loading-spinner {
        display: inline-block;
        width: 1rem;
        height: 1rem;
        border: 2px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top-color: white;
        animation: spin 1s ease-in-out infinite;
        margin-right: 8px;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    .btn-loading {
        position: relative;
        pointer-events: none;
    }
    
    .btn-loading::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin-top: -10px;
        margin-left: -10px;
        border: 2px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        border-top-color: white;
        animation: spin 1s ease-in-out infinite;
    }
    
    .form-item:hover {
        background-color: #f8f9fa; /* Subtle hover effect */
        cursor: pointer;
    }

    .form-item.selected {
        background-color: var(--primary-blue); /* Highlight color */
        color: white; /* White text for contrast */
        border-color: var(--primary-blue); /* Match border color */
    }
    
    .form-item.selected h6 {
        color: white; /* White text for contrast */
    }

    .form-item h6 {
        font-size: 19px;
        margin-bottom: 4px;
        color: #333;
    }
    
    .form-item small {
        color: #6c757d;
        font-size: 0.9rem;
        display: block;
    }