/* 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: transparent !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: transparent !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 */
}

/* 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;
    }
} 