/* Pinshape Flask - Interactions Styles */

/* Download Functionality */
.download-btn {
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.download-btn .fa-download {
    margin-right: 0.5rem;
}

/* Individual file download button */
.download-btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.download-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.download-btn-small .fa-download {
    margin-right: 0.25rem;
    font-size: 0.7rem;
}

/* Like Button Visibility Enhancement - ORIGINAL STYLING RESTORED */
.like-btn {
    background: rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    color: #dc3545 !important; /* Red color - ORIGINAL */
    padding: 0.25rem !important;
    border-radius: 0.25rem !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2rem !important;
    height: 2rem !important;
}

.like-btn:hover {
    background: rgba(220, 53, 69, 0.1) !important; /* Light red background on hover - ORIGINAL */
    color: #dc3545 !important; /* Keep red color - ORIGINAL */
    text-decoration: none !important;
}

/* Liked state - keep red but with transparent background - ORIGINAL */
.like-btn.liked {
    background: rgba(220, 53, 69, 0.1) !important; /* Light red background when liked - ORIGINAL */
    color: #dc3545 !important; /* Red color - ORIGINAL */
}

.like-btn .fa-heart {
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

.like-btn:hover .fa-heart {
    transform: scale(1.1) !important; /* Slight zoom on hover - ORIGINAL */
}

.like-btn.liked .fa-heart {
    transform: scale(1.1) !important; /* Keep zoomed when liked - ORIGINAL */
}

/* Collection Button - Match the ORIGINAL heart behavior but no zoom */
.collection-btn {
    background: rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    color: #28a745 !important; /* Green color for collections */
    padding: 0.25rem !important;
    border-radius: 0.25rem !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2rem !important;
    height: 2rem !important;
}

.collection-btn:hover {
    background: rgba(40, 167, 69, 0.1) !important; /* Light green background on hover */
    color: #28a745 !important; /* Keep green color */
    text-decoration: none !important;
}

/* Collected state - green version of heart's red styling but no zoom */
.collection-btn.collected {
    background: rgba(40, 167, 69, 0.1) !important; /* Light green background when collected */
    color: #28a745 !important; /* Green color */
}

.collection-btn .fa-bookmark {
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

.collection-btn:hover .fa-bookmark {
    /* No zoom effect for collections - different from hearts */
}

.collection-btn.collected .fa-bookmark {
    /* No zoom effect for collections - different from hearts */
}

/* Override Bootstrap button backgrounds ONLY for semi-transparency */
.like-toggle.btn-outline-light {
    background: rgba(0, 0, 0, 0.2) !important;
}

.collect-toggle.btn-outline-light {
    background: rgba(0, 0, 0, 0.2) !important;
}

.image-nav-prev.btn-outline-light,
.image-nav-next.btn-outline-light {
    background: rgba(0, 0, 0, 0.2) !important;
}

/* Image Modal Navigation Buttons */
#modalNavPrev.btn-outline-light,
#modalNavNext.btn-outline-light {
    background: rgba(0, 0, 0, 0.2) !important;
}

/* Print Modal Carousel Navigation Buttons */
#printModal .carousel-control-prev,
#printModal .carousel-control-next {
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    top: 50%;
    transform: translateY(-50%);
}

#printModal .carousel-control-prev {
    left: 1rem;
}

#printModal .carousel-control-next {
    right: 1rem;
}

/* Collection Modal Styles */
.collection-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.collection-item {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collection-item:hover {
    border-color: var(--pinshape-primary);
    background-color: rgba(102, 126, 234, 0.05);
}

.collection-item.selected {
    border-color: var(--pinshape-primary);
    background-color: rgba(102, 126, 234, 0.1);
}

/* Spinner Animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Collection Modal Improvements */
.collection-modal .modal-dialog {
    max-width: 500px;
}

.collection-modal .modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.collection-modal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.collection-modal .btn-primary {
    background-color: var(--pinshape-primary);
    border-color: var(--pinshape-primary);
}

/* Alert positioning */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert-dismissible {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-dismissible.fade.show {
    animation: slideInRight 0.3s ease;
}

/* Form interactions */
.form-control:focus {
    border-color: var(--pinshape-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background-color: var(--pinshape-primary);
    border-color: var(--pinshape-primary);
}

.btn-primary:hover {
    background-color: var(--pinshape-secondary);
    border-color: var(--pinshape-secondary);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Search form styling */
.search-form .input-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-form .form-control {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.search-form .btn {
    border: none;
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    background-color: var(--pinshape-primary);
    color: white;
}

.search-form .btn:hover {
    background-color: var(--pinshape-secondary);
}

/* Modal backdrop and dialog improvements */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-dialog {
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Button group interactions */
.btn-group .btn {
    transition: all 0.2s ease;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Loading states */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Hover effects for interactive elements */
.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .alert-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .modal-dialog {
        margin: 0.5rem;
        max-width: none;
    }
    
    .collection-modal .modal-body {
        max-height: 50vh;
    }
    
    .search-form .form-control {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .search-form .btn {
        padding: 0.5rem 1rem;
    }
    
    .like-btn,
    .collection-btn {
        min-width: 1.75rem !important;
        height: 1.75rem !important;
    }
    
    .like-btn .fa-heart,
    .collection-btn .fa-bookmark {
        font-size: 0.9rem !important;
    }
    
    /* Mobile search and filter layout improvements */
    #mainSearchForm .row.g-3 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 0.5rem;
    }
    
    /* Make search input take full width on mobile */
    #mainSearchForm .col:first-child {
        flex: 1 0 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Arrange filters and sort side by side on mobile */
    #mainSearchForm .col-auto {
        flex: 1;
    }
    
    .filters-dropdown-container {
        flex: 1 1 auto !important;
        margin-right: 0.5rem;
    }
    
    .filters-dropdown-container .dropdown {
        width: 100%;
    }
    
    .filters-dropdown-container .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Sort dropdown adjustments */
    #mainSearchForm .col-auto:last-child {
        flex: 1 1 auto;
    }
    
    #mainSearchForm .col-auto:last-child .dropdown {
        width: 100%;
    }
    
    #mainSearchForm .col-auto:last-child .btn {
        width: 100%;
    }
    
    /* Search input group improvements */
    #mainSearchForm .input-group .form-control {
        font-size: 1rem;
        padding: 0.75rem 1rem;
        border-radius: 0.375rem 0 0 0.375rem;
    }
    
    #mainSearchForm .input-group .btn {
        padding: 0.75rem 1.25rem;
        border-radius: 0 0.375rem 0.375rem 0;
    }
    
    /* Hide 'Sort By' label on mobile to save space */
    #mainSearchForm .col-auto:last-child .form-label {
        display: none;
    }
    
    /* Hide 'Search Items' label on mobile */
    #mainSearchForm .col:first-child .form-label {
        display: none;
    }
    
    /* Minimize space after 'Discover amazing...' text */
    .container .row.mb-4:first-of-type {
        margin-bottom: 0.75rem !important;
    }
    
    /* Reduce space between page header and search section */
    .container .row.mb-4:nth-of-type(2) {
        margin-bottom: 1.5rem !important;
    }
    
    /* Mobile Search Button in Navbar */
    .navbar .btn-outline-secondary {
        border-color: #dee2e6;
        color: #6c757d;
        margin-right: 0.5rem;
    }
    
    .navbar .btn-outline-secondary:hover {
        background-color: var(--pinshape-primary);
        border-color: var(--pinshape-primary);
        color: white;
    }
    
    /* Hamburger button padding */
    .navbar-toggler {
        margin-right: 1rem;
    }
    
    /* Mobile Hamburger Menu Improvements */
    .navbar-collapse {
        border-top: 1px solid #dee2e6;
        margin-top: 0.25rem;
        padding-top: 0.5rem;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.375rem 1rem;
        border-radius: 0.375rem;
        margin: 0;
        display: flex;
        align-items: center;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(102, 126, 234, 0.1);
    }
    
    .navbar-nav .nav-link i {
        width: 1.25rem;
        margin-right: 0.75rem;
        text-align: center;
    }
    
    /* User dropdown in mobile menu */
    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: #f8f9fa;
        margin: 0.5rem 1rem;
        border-radius: 0.375rem;
        padding: 0.5rem;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.5rem 0.75rem;
        border-radius: 0.25rem;
        margin-bottom: 0.125rem;
    }
    
    .navbar-nav .dropdown-item:hover {
        background-color: rgba(102, 126, 234, 0.1);
    }
    
    /* User profile section in mobile */
    .navbar-nav .dropdown-toggle {
        padding: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        background-color: #f8f9fa;
        margin: 0.5rem 0;
    }
    
    .navbar-nav .dropdown-toggle::after {
        margin-left: auto;
    }
    
    /* Join Free button spacing */
    .navbar-nav .btn-primary {
        margin-top: 0.5rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    /* Flash messages in mobile menu */
    .navbar-nav .alert {
        margin: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Mobile User Profile Header */
    .navbar-nav .nav-item.border-bottom {
        border-color: #dee2e6 !important;
        padding-bottom: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .navbar-nav .nav-item.border-top {
        border-color: #dee2e6 !important;
        padding-top: 0.5rem !important;
        margin-top: 0.5rem !important;
    }
    
    /* Mobile user avatar in menu */
    .navbar-nav .nav-link img.rounded-circle {
        border: 2px solid #dee2e6;
    }
    
    /* Mobile moderation select */
    #globalModerationSelectMobile {
        margin-top: 0.125rem;
        border-color: #dee2e6;
        width: auto;
        max-width: 150px;
    }
    
    /* Tighten up moderation section */
    .navbar-nav .nav-item .px-3 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-bottom: 0 !important;
    }
    
    /* Mobile navigation container - extend to full width */
    .navbar .container .collapse.d-lg-none {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
    }
    
    /* Mobile navigation separators - extend to full width */
    .collapse.d-lg-none hr.my-0.w-100 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    #globalModerationSelectMobile:focus {
        border-color: var(--pinshape-primary);
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }
    
    /* Logout link styling */
    .navbar-nav .nav-link.text-danger:hover {
        background-color: rgba(220, 53, 69, 0.1);
        color: #dc3545 !important;
    }
} 