/* Unsubscribed Users Page Styles */

.unsubscribed-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Search Container */
.search-container {
    position: relative;
    display: inline-block;
}

.search-container input {
    padding-left: 35px; /* Make room for clear icon */
    padding-right: 35px; /* Make room for search icon */
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.clear-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    padding: 5px;
}

.clear-icon:hover {
    color: #dc3545;
}

/* Search and Filter Bar */
.search-filter-bar {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.search-filter-bar .search-container {
    width: 100%;
}

.search-filter-bar .input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.search-filter-bar .form-control,
.search-filter-bar .form-select {
    border-color: #dee2e6;
}

.search-filter-bar .form-control:focus,
.search-filter-bar .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Table Styles */
#unsubscribedTable {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#unsubscribedTable thead th {
    background-color: #343a40;
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 0.75rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

#unsubscribedTable thead th i {
    margin-left: 0.5rem;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s;
}

#unsubscribedTable thead th i:hover {
    opacity: 1;
}

#unsubscribedTable tbody tr {
    transition: background-color 0.2s;
}

#unsubscribedTable tbody tr:hover {
    background-color: #f8f9fa;
}

#unsubscribedTable tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

/* Status Badge */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
}

/* Action Buttons */
.action-btn {
    padding: 0.25rem 0.5rem;
    margin: 0 0.125rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-view {
    background-color: #007bff;
    color: white;
}

.btn-view:hover {
    background-color: #0056b3;
    color: white;
}

.btn-edit {
    background-color: #28a745;
    color: white;
}

.btn-edit:hover {
    background-color: #1e7e34;
    color: white;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
    color: white;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    flex: 1;
    min-width: 200px;
}

.pagination-nav {
    flex-shrink: 0;
}

.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: #dc3545;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
    background-color: #fff;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.pagination .page-item.active .page-link {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
    color: #6c757d;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    transform: none;
    box-shadow: none;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.modal-title {
    font-weight: 600;
    color: #343a40;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .row {
    margin-bottom: 1rem;
}

.modal-body strong {
    color: #495057;
    font-weight: 600;
}

/* Loading States */
.loading-component {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 8px;
}

.progress-container-component {
    width: 200px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar-component {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
    animation: progress-animation 2s ease-in-out infinite;
}

.loading-text-component {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

@keyframes progress-animation {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-filter-bar {
        padding: 0.75rem;
    }
    
    .search-filter-bar .row {
        margin: 0 -0.25rem;
    }
    
    .search-filter-bar .row > div {
        margin-bottom: 0.75rem;
        padding: 0 0.25rem;
    }
    
    .search-filter-bar .search-container {
        width: 100%;
    }
    
    .search-filter-bar .search-container input {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    #unsubscribedTable {
        font-size: 0.875rem;
    }
    
    #unsubscribedTable thead th,
    #unsubscribedTable tbody td {
        padding: 0.5rem 0.25rem;
    }
    
    .action-btn {
        padding: 0.125rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .pagination-container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .pagination-info {
        text-align: center;
        min-width: auto;
        order: 1;
    }
    
    .pagination-nav {
        order: 2;
    }
    
    .pagination {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .search-filter-bar {
        padding: 0.5rem;
    }
    
    .search-filter-bar .row {
        margin: 0 -0.125rem;
    }
    
    .search-filter-bar .row > div {
        margin-bottom: 0.5rem;
        padding: 0 0.125rem;
    }
    
    .search-filter-bar .search-container input {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .action-left,
    .action-right {
        width: 100%;
        justify-content: center;
    }
    
    .action-right .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .pagination-container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .pagination-info {
        text-align: center;
        min-width: auto;
        order: 1;
    }
    
    .pagination-nav {
        order: 2;
    }
    
    .pagination {
        justify-content: center;
    }
}

/* Custom scrollbar for table */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
