/**
 * Premium Share System Styles
 * ISKCON Kurukshetra
 */

/* Share Button on Gallery Cards */
.darshan-btn-share {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), 
                background 0.2s ease, 
                box-shadow 0.2s ease, 
                color 0.2s ease;
}

.darshan-btn-share:hover {
    background: #e8821a; /* Devotional Saffron */
    color: #fff;
    transform: translateY(-2px) scale(1.18);
    box-shadow: 0 8px 20px rgba(232, 130, 26, 0.45);
}

/* Share Button in Lightbox Bar */
.lightbox-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    padding: 0.65rem 1.4rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), 
                background 0.2s ease, 
                box-shadow 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.lightbox-share-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Fallback Modal Modern Glassmorphism Styles */
.share-modal .modal-content {
    background: rgba(46, 20, 6, 0.85); /* Deep sandalwood warm dark */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(232, 163, 33, 0.25);
    border-radius: 24px;
    color: #fffdf9;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.share-modal .modal-header {
    border-bottom: 1px solid rgba(232, 163, 33, 0.15);
    padding: 1.5rem 1.5rem 1rem;
}

.share-modal .modal-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    color: #e8821a;
}

.share-modal .btn-close-custom {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.share-modal .btn-close-custom:hover {
    background: rgba(232, 130, 26, 0.3);
    color: #fff;
    transform: rotate(90deg);
}

.share-modal .modal-body {
    padding: 1.5rem;
}

/* Grid of Sharing Options */
.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Modern Share Buttons */
.share-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.share-option-btn i {
    font-size: 1.6rem;
    transition: transform 0.2s ease;
}

.share-option-btn span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Ripple Effect container */
.share-option-btn::after {
    content: "";
    background: rgba(255, 255, 255, 0.3);
    display: block;
    position: absolute;
    border-radius: 50%;
    padding-top: 240%;
    padding-left: 240%;
    margin-top: -120%;
    margin-left: -120%;
    opacity: 0;
    transition: all 0.8s;
}

.share-option-btn:active::after {
    padding: 0;
    margin: 0;
    opacity: 1;
    transition: 0s;
}

/* Social Platfrom Specific Colors on Hover */
.share-option-btn[data-platform="whatsapp"]:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.4);
    color: #25d366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.2);
    transform: translateY(-3px);
}
.share-option-btn[data-platform="whatsapp"]:hover i { transform: scale(1.1); }

.share-option-btn[data-platform="facebook"]:hover {
    background: rgba(24, 119, 242, 0.15);
    border-color: rgba(24, 119, 242, 0.4);
    color: #1877f2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.2);
    transform: translateY(-3px);
}
.share-option-btn[data-platform="facebook"]:hover i { transform: scale(1.1); }

.share-option-btn[data-platform="telegram"]:hover {
    background: rgba(0, 136, 204, 0.15);
    border-color: rgba(0, 136, 204, 0.4);
    color: #0088cc;
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.2);
    transform: translateY(-3px);
}
.share-option-btn[data-platform="telegram"]:hover i { transform: scale(1.1); }

.share-option-btn[data-platform="twitter"]:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}
.share-option-btn[data-platform="twitter"]:hover i { transform: scale(1.1); }

.share-option-btn[data-platform="email"]:hover {
    background: rgba(232, 130, 26, 0.15);
    border-color: rgba(232, 130, 26, 0.4);
    color: #e8821a;
    box-shadow: 0 0 15px rgba(232, 130, 26, 0.25);
    transform: translateY(-3px);
}
.share-option-btn[data-platform="email"]:hover i { transform: scale(1.1); }

/* Second Action Row (Copy Link & Download) */
.share-actions-row {
    border-top: 1px solid rgba(232, 163, 33, 0.15);
    padding-top: 1.25rem;
    display: flex;
    gap: 1rem;
}

.share-action-alt-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-copy-link {
    background: linear-gradient(135deg, rgba(232, 163, 33, 0.2), rgba(232, 130, 26, 0.1));
    color: #f5a623;
    border: 1px solid rgba(232, 163, 33, 0.3);
}

.btn-copy-link:hover {
    background: linear-gradient(135deg, #e8821a, #f5a623);
    color: #fff;
    box-shadow: 0 4px 15px rgba(232, 130, 26, 0.3);
    transform: translateY(-2px);
}

.btn-download-img {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-download-img:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Modal Fade-in & Slide-up Animation Customization */
.share-modal.fade .modal-dialog {
    transform: translate(0, 50px);
    transition: transform 0.3s ease-out;
}

.share-modal.show .modal-dialog {
    transform: none;
}

/* Custom Bootstrap Toast styling */
.share-toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
}

.share-toast {
    background: rgba(46, 20, 6, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(232, 163, 33, 0.3);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.3s ease;
}

.share-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.share-toast .toast-icon {
    color: #4cd964;
    font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .share-modal .modal-dialog {
        margin: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .share-modal .modal-content {
        border-radius: 24px 24px 0 0;
        border-bottom: none;
    }
    
    .share-modal.fade .modal-dialog {
        transform: translate(0, 100%);
    }

    .share-modal.show .modal-dialog {
        transform: translate(0, 0);
    }
    
    .share-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .share-actions-row {
        flex-direction: column;
        gap: 0.75rem;
    }
}
