/* Card hover effect */
.freebie-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}

.freebie-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    border-color: #dee2e6;
}

.freebie-thumbnail {
    max-width: 85%;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem;
    margin: 0 auto;
    display: block;
}

.freebie-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.freebie-price-section {
    margin-bottom: 0.5rem;
}

.freebie-price-free {
    font-size: 1.5rem;
    font-weight: 700;
    color: #28a745;
}

.freebie-merchant {
    margin-bottom: 0.5rem;
}

.freebie-description {
    margin-bottom: 1rem;
}

.freebie-meta {
    margin-top: auto;
    padding-top: 1rem;
}

.freebie-actions {
    margin-top: 1rem;
}

.btn-get-deal {
    background: linear-gradient(90deg, #FDC90B, #fdc90b);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(253, 201, 11, 0.3);
}

.btn-get-deal:hover {
    transform: translateY(-2px);
    background: linear-gradient(90deg, #fdc90b, #FDC90B) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(253, 201, 11, 0.4) !important;
}

/* Ensure btn-get-deal maintains primary color on hover */
.btn-get-deal:hover:hover {
    background: linear-gradient(90deg, #fdc90b, #FDC90B) !important;
    color: white !important;
    border: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(253, 201, 11, 0.4) !important;
}

.voting-container {
    position: relative;
    z-index: 1;
    background-color: #f8fafc;
    border-radius: 18px;
    padding: 4px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Pastikan tombol voting di atas overlay */
.voting-container .freebie-vote {
    position: relative;
    z-index: 1;
    cursor: pointer; /* Ensure buttons have pointer cursor */
}

.vote-button-down, .vote-button-up {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer; /* Ensure buttons have pointer cursor */
}

.vote-button-down {
    margin-right: 6px;
}

.vote-button-up {
    margin-left: 6px;
}

.vote-button-down:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.vote-button-up:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.vote-button-down:hover i {
    color: #c1121f;
}

.vote-button-up:hover i {
    color: #1e40af;
}

.vote-button-down i {
    color: #c1121f;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.vote-button-up i {
    color: #1e40af;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.vote-score {
    font-weight: 600;
    color: #c1121f;
    font-size: 1rem;
    min-width: 25px;
    text-align: center;
}

/* Share modal styles */
.share-modal {
    display: none;
    position: fixed;
    z-index: 1060;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.share-modal.show {
    display: block;
}

.share-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 10% auto;
    padding: 0;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.3s ease-out;
}

[data-bs-theme="dark"] .share-modal-content {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-bs-theme="dark"] .share-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.share-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

[data-bs-theme="dark"] .share-modal-title {
    color: #f8f9fa;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.share-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
}

[data-bs-theme="dark"] .share-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.share-modal-body {
    padding: 1.5rem;
}

.share-item-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.share-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #212529;
}

[data-bs-theme="dark"] .share-item-title {
    color: #f8f9fa;
}

/* Copy Link Button Styles with gradient and pulse animation */
.share-copy-link {
    display: inline-block;
    background: transparent;
    color: #FDC90B; /* Changed to primary color text color */
    font-weight: 600;
    border: 1px solid #FDC90B; /* Changed to primary color border */
    border-radius: 0.75rem;
    padding: 10px 22px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(253, 201, 11, 0.3); /* Changed to primary color shadow */
    margin-bottom: 6px;
    width: 100%;
}

.share-copy-link:hover {
    background: rgba(253, 201, 11, 0.1); /* Light primary color transparent background on hover */
    box-shadow: 0 0 10px rgba(253, 201, 11, 0.6); /* Changed to primary color shadow */
    transform: translateY(-1px);
}

.share-copy-link.copied {
    background: rgba(40, 167, 69, 0.1); /* Light green transparent background when copied */
    border-color: #28a745; /* Green border when copied */
    color: #28a745; /* Green text when copied */
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
    animation: pulseCopy 0.5s ease;
}

/* Remove hover effect when copied */
.share-copy-link.copied:hover {
    background: rgba(40, 167, 69, 0.1); /* Keep same background */
    transform: none; /* Remove lift effect */
}

/* Divider with OR text */
.share-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 10px 0;
    position: relative;
}

.share-divider::before,
.share-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.share-divider::before {
    margin-right: 10px;
}

.share-divider::after {
    margin-left: 10px;
}

.share-divider-text {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Responsive adjustments for divider */
@media (max-width: 768px) {
    .share-divider {
        margin: 8px 0;
    }
    
    .share-divider-text {
        font-size: 0.8125rem;
    }
}

@keyframes pulseCopy {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Share Social Buttons */
.share-social-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 6px !important;
}

.share-social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 2px solid #FDC90B !important;
    border-radius: 50%;
    background: transparent !important;
    font-weight: 600;
    color: #FDC90B !important;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    /* Ensure the entire button area is clickable */
    box-sizing: border-box;
}

.share-social-button i {
    font-size: 1.2rem;
    color: #FDC90B !important;
    /* Make sure the icon doesn't interfere with button click area */
    pointer-events: none;
}

/* Remove brand-specific colors */
.share-whatsapp, .share-twitter, .share-facebook {
    background: transparent !important;
    border: 2px solid #FDC90B !important;
    color: #FDC90B !important;
}

/* Restore hover effects */
.share-social-button:hover {
    background: transparent !important;
    border-color: #FDC90B !important;
    color: #FDC90B !important;
    transform: translateY(-3px);
}

.share-social-button:hover i {
    color: #FDC90B !important;
}

/* Dark mode support */
[data-bs-theme="dark"] .share-social-button {
    background: transparent !important;
    border: 2px solid #FDC90B !important;
    color: #FDC90B !important;
}

[data-bs-theme="dark"] .share-social-button i {
    color: #FDC90B !important;
}

/* Hover effects in dark mode */
[data-bs-theme="dark"] .share-social-button:hover {
    background: transparent !important;
    border-color: #FDC90B !important;
    color: #FDC90B !important;
    transform: translateY(-3px);
}

[data-bs-theme="dark"] .share-social-button:hover i {
    color: #FDC90B !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .share-social-buttons {
        gap: 6px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        flex-direction: row !important;
    }
    
    .share-social-button {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .share-social-button i {
        font-size: 1rem;
    }
}