/**
 * Resource Bookmark Button Styles
 * Styles for bookmark button overlay on resource cards
 */

/* Bookmark button overlay */
@import '/wp-content/themes/inconf-core/assets/css/variables.css';
.bookmark-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
}

.bookmark-btn i {
    color: #fff;
    font-size: 20px;
    transition: all 0.3s ease;
}

/* Hover state */
.bookmark-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.bookmark-btn:hover i {
    color: var(--theme-highlight-color);
}

/* Active/Bookmarked state */
.bookmark-btn.bookmarked {
    background: var(--theme-highlight-color);
    border-color: var(--theme-highlight-color);
}

.bookmark-btn.bookmarked i {
    color: var(--theme-primary-color);
}

.bookmark-btn.bookmarked:hover {
    background: var(--theme-highlight-color);
}

/* Disabled state during AJAX */
.bookmark-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bookmark-btn:disabled:hover {
    transform: none;
}

/* Focus state for accessibility */
.bookmark-btn:focus {
    outline: 2px solid var(--theme-hightlight-color);
    outline-offset: 2px;
}

/* Animation when bookmarking */
@keyframes bookmark-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.bookmark-btn.animating {
    animation: bookmark-pulse 0.4s ease;
}

/* Ensure card image container has relative positioning */
.card-img-top.scale-clip {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bookmark-btn {
        width: 40px;
        height: 40px;
    }
    
    .bookmark-btn i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .bookmark-btn {
        width: 35px;
        height: 35px;
        top: 8px;
        right: 8px;
    }
    
    .bookmark-btn i {
        font-size: 16px;
    }
}

/* Modal styling - Minimal overrides for Bootstrap card style */
#bookmarkModal .modal-dialog {
    max-width: 400px;
}

#bookmarkModal .modal-title {
    font-size: 1.3rem;
    font-family: var(--title-font-family) !important;
}

/* Bookmarked Resources Tab Styling */
#bookmarks-tab {
    font-weight: 600;
}

#bookmarks-tab i.fa-bookmark,
.fa-bookmark.highlight {
    color: var(--theme-highlight-color);
}

#bookmarks-tab.active {
    background-color: rgba(255, 215, 0, 0.2) !important;
}

#bookmarks-tab:hover i.fa-bookmark {
    animation: bookmark-pulse 0.6s ease;
}

/* Fade out animation for removed cards */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.card-removing {
    animation: fadeOut 0.3s ease forwards;
}

/* Prevent Safari iOS page zoom when PDF modal is open */
body.modal-open {
    touch-action: none;
    -webkit-user-select: none;
  }
  
  /* Allow touch interactions within PDF modal iframe */
  body.modal-open iframe[id^="pdf-viewer-"] {
    touch-action: auto;
  }

  body.page-template-inconf-resources-bookmarks{
    background-color: var(--theme-primary-color);
  }
