/* assets/css/fb-pages.css */
/* Styles para LANG sa Facebook Pages table */

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap; 
    gap: 1rem;
}

.content-header h1 {
    color: var(--header-maroon);
    margin: 0;
    flex-shrink: 0; 
}

.content-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-grow: 1; 
    justify-content: flex-end; 
}

/* General Button Style */
.btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    flex-grow: 0;   
    flex-shrink: 0; 
    width: auto;      
    position: relative;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-dark);
}
.btn-primary:hover {
    opacity: 0.8;
}

/* Table Wrapper */
.table-wrapper {
    width: 100%;
    overflow-x: auto; 
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.crud-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.crud-table th,
.crud-table td {
    padding: 1rem;
    text-align: left;
    color: var(--text-dark-secondary);
}

.crud-table th {
    border-bottom: 2px solid rgba(0,0,0,0.1);
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crud-table tbody tr {
    border-bottom: 1px solid #eee;
}
.crud-table tbody tr:last-child {
    border-bottom: none;
}
.crud-table tbody tr:hover {
    background: #f9f9f9;
}

/* Action Buttons (Edit/Delete) */
.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.btn-action {
    font-size: 1.2rem;
    color: var(--text-dark-secondary);
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}
.btn-action:hover {
    color: var(--accent-primary);
    background: #f0f0f0;
}
.btn-action.btn-delete:hover {
    color: #e74c3c;
    background: #fbeeee;
}

.btn-action i {
    pointer-events: none;
}

/* Tooltip */
.btn[data-tooltip]::after,
.btn-action[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%; 
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.btn[data-tooltip]:hover::after,
.btn-action[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}


/* --- SEARCH BAR CSS --- */
.table-search-wrapper {
    position: relative;
    background: #fff;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    flex-grow: 1;  
    flex-shrink: 1; 
    width: auto;     
    max-width: 400px; 
}

.table-search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dark-secondary);
    font-size: 1.1rem; 
    pointer-events: none;
}

.table-search-wrapper input[type="text"] {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem; 
    border-radius: 8px;
    border: none;
    font-size: 0.9rem; 
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background: transparent;
}

.table-search-wrapper input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.text-center {
    text-align: center;
}


/* --- RESPONSIVE RULES para sa FB PAGES --- */
@media (max-width: 767px) {
    .content-header {
        flex-direction: column;
        align-items: stretch; 
    }

    .content-header h1 {
        font-size: 1.5rem;
        text-align: center; 
    }

    .content-header-actions {
        flex-direction: row; /* MAGKATABI NA ULIT */
        width: 100%;
        gap: 0.75rem;
        justify-content: flex-start; 
    }

    .table-search-wrapper {
        width: 100%; 
        max-width: none;
        flex-grow: 1; /* Search bar ang lalaki */
    }

    /* --- ITO ANG FIX PARA SA FB PAGES "ADD NEW" BUTTON --- */
    /* Target lang ang #add-page-btn */
    .btn#add-page-btn {
        width: 38px; /* Sukat ng icon button */
        height: 38px;
        padding: 0;
        flex-shrink: 0; /* Huwag paliitin */
    }
    .btn#add-page-btn i {
        font-size: 1.2rem;
        margin: 0;
    }
    .btn#add-page-btn span {
        display: none; /* Itago ang text */
    }
    /* --- DULO NG FIX --- */
    
    .table-wrapper {
        padding: 0;
        border: none;
        box-shadow: none;
    }

    .crud-table {
        min-width: 100%;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
        border-radius: 8px;
        overflow: hidden;
    }
    
    .crud-table thead {
        display: none;
    }
    
    .crud-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 8px;
    }
    .crud-table tr:last-child {
        margin-bottom: 0;
    }

    .crud-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        text-align: right;
        border-bottom: 1px solid #eee;
    }
    .crud-table td:last-child {
        border-bottom: none;
    }

    .crud-table td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        color: var(--text-dark);
        margin-right: 1rem;
    }
    
    .action-buttons {
        justify-content: flex-end;
    }
}