/**
 * GPL EDD Bookmarks - Frontend Styles
 */

/* ===========================================
   BOOKMARK BUTTON
   =========================================== */
.gpleddb-bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #5E97DD;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 400;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpleddb-bookmark-btn:hover {
    background: #4a7fc4;
}

.gpleddb-bookmark-btn.is-bookmarked {
    background: #1F5494;
}

.gpleddb-bookmark-btn.is-bookmarked:hover {
    background: #174076;
}

.gpleddb-bookmark-btn .gpleddb-icon {
    display: flex;
    align-items: center;
}

.gpleddb-bookmark-btn .gpleddb-icon svg {
    transition: all 0.2s ease;
}

.gpleddb-bookmark-btn.is-bookmarked .gpleddb-icon svg {
    fill: currentColor;
}

/* Loading state */
.gpleddb-bookmark-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ===========================================
   BOOKMARKS TABLE
   =========================================== */
.gpleddb-table-wrapper {
    width: 100%;
    max-width: 100%;
}

.gpleddb-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
}

.gpleddb-count {
    font-size: 14px;
    color: #666;
}

.gpleddb-header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.gpleddb-notify-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpleddb-notify-toggle:hover {
    background: #f5f5f5;
}

.gpleddb-notify-toggle.is-on {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.gpleddb-notify-toggle .gpleddb-notify-icon {
    display: flex;
    align-items: center;
}

.gpleddb-bookmarks-table,
.gpleddb-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.gpleddb-bookmarks-table th,
.gpleddb-bookmarks-table td,
.gpleddb-table th,
.gpleddb-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.gpleddb-bookmarks-table th,
.gpleddb-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gpleddb-bookmarks-table td,
.gpleddb-table td {
    font-size: 14px;
    color: #333;
}

.gpleddb-bookmarks-table td a,
.gpleddb-table td a {
    color: #1F5494;
    text-decoration: none;
}

.gpleddb-bookmarks-table td a:hover,
.gpleddb-table td a:hover {
    text-decoration: underline;
}

.gpleddb-bookmarks-table tbody tr:last-child td,
.gpleddb-table tbody tr:last-child td {
    border-bottom: none;
}

.gpleddb-bookmarks-table tbody tr:hover,
.gpleddb-table tbody tr:hover {
    background: #f8f9fa;
}

/* Remove button */
.gpleddb-remove-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #dc3545;
    border-radius: 4px;
    font-size: 12px;
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpleddb-remove-btn:hover {
    background: #dc3545;
    color: #fff;
}

/* Pagination */
.gpleddb-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
}

.gpleddb-page-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    color: #1F5494;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gpleddb-page-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.gpleddb-page-info {
    font-size: 14px;
    color: #666;
}

/* ===========================================
   HEADER BADGE
   =========================================== */
.gpleddb-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px !important;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.gpleddb-header-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    text-decoration: none;
}

.gpleddb-header-icon {
    display: flex;
    align-items: center;
}

.gpleddb-header-text {
    line-height: 1;
}

.gpleddb-header-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 6px;
    background: #fff;
    color: #4285D7;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

/* Legacy support for old class names */
.gpleddb-header-link {
    display: inline-flex;
    align-items: center;
    position: relative;
    padding: 8px;
    color: inherit;
    text-decoration: none;
}

.gpleddb-header-link:hover {
    opacity: 0.8;
}

.gpleddb-header-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dc3545;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    line-height: 18px;
    text-align: center;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .gpleddb-table-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .gpleddb-bookmarks-table th,
    .gpleddb-bookmarks-table td,
    .gpleddb-table th,
    .gpleddb-table td {
        padding: 10px 12px;
    }
    
    .gpleddb-bookmarks-table th:nth-child(2),
    .gpleddb-bookmarks-table td:nth-child(2),
    .gpleddb-bookmarks-table th:nth-child(3),
    .gpleddb-bookmarks-table td:nth-child(3),
    .gpleddb-table th:nth-child(2),
    .gpleddb-table td:nth-child(2),
    .gpleddb-table th:nth-child(3),
    .gpleddb-table td:nth-child(3) {
        display: none;
    }
    
    .gpleddb-pagination {
        flex-wrap: wrap;
    }
}
