/* Screenshot Modal Styles */
#screenshotModal .modal-dialog {
    max-width: 90vw;
    width: auto;
    margin: 2rem auto;
}

#screenshotModal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

#screenshotModal .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

#screenshotModal .modal-title {
    font-weight: 600;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#screenshotModal .btn-close {
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#screenshotModal .btn-close:hover {
    opacity: 1;
}

#screenshotModal .modal-body {
    padding: 0;
    background: #fff;
}

.screenshot-modal-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8f9fa;
    min-height: 400px;
}

.modal-screenshot-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 1.5rem;
}

.screenshot-modal-caption {
    padding: 1rem 1.5rem;
    text-align: center;
    background: #fff;
    width: 100%;
    border-top: 1px solid #e9ecef;
}

.screenshot-modal-caption h6 {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.screenshot-modal-caption p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.screenshot-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    gap: 1rem;
}

.screenshot-navigation .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    min-width: 100px;
}

.screenshot-navigation .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.screenshot-navigation .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.screenshot-counter {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
    white-space: nowrap;
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #e9ecef;
}

.screenshot-counter span {
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #screenshotModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }

    .modal-screenshot-image {
        margin: 1rem;
        max-height: 60vh;
    }

    .screenshot-navigation {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .screenshot-navigation .btn {
        min-width: 80px;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .screenshot-counter {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .screenshot-modal-caption {
        padding: 0.75rem 1rem;
    }

    .screenshot-modal-caption h6 {
        font-size: 1rem;
    }

    .screenshot-modal-caption p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    #screenshotModal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .modal-screenshot-image {
        margin: 0.5rem;
        border-radius: 4px;
    }

    #screenshotModal .modal-header {
        padding: 0.75rem 1rem;
    }

    #screenshotModal .modal-title {
        font-size: 1rem;
    }
}

/* Loading and transition effects */
.modal-screenshot-image {
    transition: opacity 0.3s ease;
}

.modal-screenshot-image[src=""] {
    opacity: 0;
}

/* Focus styles for accessibility */
.screenshot-navigation .btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Hover effect for clickable screenshots */
.screenshot img[style*="cursor: pointer"]:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.testimonial-screenshot img[style*="cursor: pointer"]:hover,
.reporte-preview img[style*="cursor: pointer"]:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Animation for modal opening */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#screenshotModal.show .modal-content {
    animation: modalFadeIn 0.3s ease-out;
}
