/* Shareable Slider Styles */

/* Share icon positioning */
.shareable_slider .owl-item {
    position: relative;
}

/* Share icon only visible on selected images */
.shareable_slider .owl-item.selected .share-icon {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    animation: shareIconAppear 0.3s ease-out;
}

/* Ensure share icon is hidden on non-selected images */
.shareable_slider .owl-item:not(.selected) .share-icon {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

@keyframes shareIconAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.share-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: #007cba;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 124, 186, 0.3);
}

.share-icon:hover {
    background: #005a87;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.4);
}

.share-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Image selection and hover effects with smooth transitions */
.shareable_slider .owl-item .owl-thumb {
    border: 3px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.shareable_slider .owl-item:hover .owl-thumb {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.shareable_slider .owl-item.selected .owl-thumb {
    border: 3px solid #007cba;
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
    transform: scale(1.02);
    animation: selectionPulse 0.5s ease-out;
}

/* Selection animation */
@keyframes selectionPulse {
    0% {
        border-color: transparent;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
    50% {
        border-color: #007cba;
        box-shadow: 0 6px 25px rgba(0, 124, 186, 0.4);
        transform: scale(1.05);
    }
    100% {
        border-color: #007cba;
        box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
        transform: scale(1.02);
    }
}

/* Deselection animation */
.shareable_slider .owl-item:not(.selected) .owl-thumb {
    animation: deselectionFade 0.3s ease-out;
}

@keyframes deselectionFade {
    0% {
        border-color: #007cba;
        box-shadow: 0 4px 20px rgba(0, 124, 186, 0.3);
        transform: scale(1.02);
    }
    100% {
        border-color: transparent;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
}

/* Popup overlay */
.shareable-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.shareable-popup-overlay.active {
    display: flex;
}

/* Popup container */
.shareable-popup {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Popup header */
.shareable-popup-header {
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(270deg, #38C25B 0%, #0077FF 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.shareable-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.shareable-popup-close {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.shareable-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Popup content */
.shareable-popup-content {
    padding: 25px;
}

/* Selected image preview */
.selected-image-preview {
    text-align: center;
    margin-bottom: 20px;
}

.selected-image-preview img {
    max-width: 100%;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-group textarea {
    resize: vertical;
    max-height: 80px;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 10px;
}

.btn-cancel,
.btn-send {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
}

.btn-cancel:hover {
    background: #eee;
    color: #333;
}

.btn-send {
    background: linear-gradient(270deg, #38C25B 0%, #0077FF 100%);
    color: white; 
}

.btn-send:hover {
    background: linear-gradient(135deg, #005a87, #003d5b);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.btn-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-spinner p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Success/Error messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form state management */
#shareable-form {
    transition: all 0.3s ease;
}

/* Form states */
#shareable-form.form-loading {
    opacity: 0;
    pointer-events: none;
}

#shareable-form.form-success {
    opacity: 0;
    pointer-events: none;
}

#shareable-form.form-error {
    opacity: 1;
    pointer-events: auto;
}

/* Success state styling for popup content */
.shareable-popup-content:has(.form-success) {
    text-align: center;
}

.shareable-popup-content:has(.form-success) .selected-image-preview {
    margin-bottom: 30px;
}

/* Message styling enhancements */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: messageSlideIn 0.3s ease-out;
    text-align: center;
}

.message.success {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    color: #2e7d32;
    border: 2px solid #81c784;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.message.error {
    background: linear-gradient(135deg, #ffebee, #fff3e0);
    color: #c62828;
    border: 2px solid #ef5350;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.2);
}

@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.shareable_slider .item .owl-thumb {
    position: relative;
}
.shareable_slider .item .owl-thumb:after {
    content: "";
    width: 30px;
    height: 30px;
    background-color: #FFF;
    position: absolute;
    top: 15px;
    border: 3px solid #FFF;
    z-index: 9;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.2);
    left: 15px;
    border-radius: 7px;
}
.shareable_slider .owl-item.selected .item .owl-thumb:after {background-color: #FFF;}

.shareable_slider .item .owl-thumb:before {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    background-size: 31px;
    border-radius: 50%;
    background-repeat: no-repeat;
    fill: #FFF;
    z-index: 99;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m9.55 15.15l8.475-8.475q.3-.3.7-.3t.7.3t.3.713t-.3.712l-9.175 9.2q-.3.3-.7.3t-.7-.3L4.55 13q-.3-.3-.288-.712t.313-.713t.713-.3t.712.3z'/%3E%3C/svg%3E");
    color: #FFF;
    opacity: 0;
}
.shareable_slider .owl-item.selected .item .owl-thumb:before{opacity: 1;}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .shareable-popup {
        width: 95%;
        margin: 10px;
    }
    
    .shareable-popup-header {
        padding: 15px 20px;
    }
    
    .shareable-popup-content {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-send {
        width: 100%;
    }
    
    .share-icon {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
    }
    
    .share-icon svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .selected-image-preview img {
        max-height: 150px;
    }
    
    .shareable-popup-header h3 {
        font-size: 16px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
} 

/* Success state when form is hidden */
.shareable-popup-content:has(#shareable-form:not([style*="display: block"])) .message.success {
    padding: 25px 30px;
    margin: 30px 0;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    color: #2e7d32;
    border: 3px solid #81c784;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    border-radius: 12px;
}

/* Enhanced success message when form is hidden */
.shareable-popup-content:has(#shareable-form[style*="display: none"]) .message.success {
    text-align: center;
    padding: 30px;
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.5;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #e8f5e9 100%);
    color: #1b5e20;
    border: 3px solid #4caf50;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    border-radius: 15px;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 15px 35px rgba(76, 175, 80, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    }
} 