/* Custom Modal Dialog Styles */
#lottie-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.lottie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
}

.lottie-modal-overlay.show {
    opacity: 1;
}

.lottie-modal-dialog {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 30px;
    max-width: 90%;
    width: 420px;
    text-align: center;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
    direction: ltr; /* Ensure LTR for modal regardless of page direction */
}

.lottie-modal-dialog.show {
    transform: scale(1);
    opacity: 1;
}

/* Modal types with color accents */
.lottie-modal-dialog.success {
    border-top: 5px solid #28a745;
}

.lottie-modal-dialog.error {
    border-top: 5px solid #dc3545;
}

.lottie-modal-dialog.warning {
    border-top: 5px solid #ffc107;
}

.lottie-modal-dialog.info {
    border-top: 5px solid #17a2b8;
}

.lottie-modal-dialog.loading {
    border-top: 5px solid #6c757d;
}

/* Loading spinner styles */
.loading-spinner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner svg {
    width: 70px;
    height: 70px;
    transform-origin: center;
    animation: spinner-rotate 2s linear infinite;
}

.loading-spinner circle {
    stroke-linecap: round;
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
    animation: spinner-dash 1.5s ease-in-out infinite;
}

@keyframes spinner-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinner-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.lottie-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.lottie-modal-close:hover {
    color: #333;
}

.lottie-modal-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

/* Increased size for all modal animations */
.lottie-modal-dialog.success .lottie-modal-animation,
.lottie-modal-dialog.error .lottie-modal-animation,
.lottie-modal-dialog.warning .lottie-modal-animation,
.lottie-modal-dialog.info .lottie-modal-animation {
    width: 100px;
    height: 100px;
}

/* Success animation with specific sizing for optimal display */
.lottie-modal-dialog.success .lottie-modal-animation {
    width: 150px;
    height: 150px;
    overflow: visible;
    position: relative;
}

/* Ensure SVG fills the container */
.lottie-modal-animation svg {
    width: 70%;
    height: 70%;
}

/* Loading animation can remain smaller */
.lottie-modal-dialog.loading .lottie-modal-animation {
    width: 120px;
    height: 120px;
}

.lottie-modal-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.lottie-modal-message {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
    white-space: pre-line;
}

/* Alert message styles for modals */
.modal-alert-text {
    padding: 12px 15px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.modal-alert-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.modal-alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.lottie-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.lottie-modal-button {
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    min-width: 100px;
}

.lottie-modal-button.default {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.lottie-modal-button.default:hover {
    background-color: #e9e9e9;
}

.lottie-modal-button.primary {
    background-color: #1976d2;
    color: white;
}

.lottie-modal-button.primary:hover {
    background-color: #1565c0;
}

.lottie-modal-button.success {
    background-color: #28a745;
    color: white;
}

.lottie-modal-button.success:hover {
    background-color: #218838;
}

.lottie-modal-button.error {
    background-color: #dc3545;
    color: white;
}

.lottie-modal-button.error:hover {
    background-color: #c82333;
}

.lottie-modal-button.warning {
    background-color: #ffc107;
    color: #333;
}

.lottie-modal-button.warning:hover {
    background-color: #e0a800;
}

.lottie-modal-button.info {
    background-color: #17a2b8;
    color: white;
}

.lottie-modal-button.info:hover {
    background-color: #138496;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .lottie-modal-dialog {
        width: 90%;
        padding: 20px;
    }
    
    .lottie-modal-animation {
        width: 100px;
        height: 100px;
        margin-bottom: 15px;
    }
    
    /* Keep all animations larger even on mobile */
    .lottie-modal-dialog.success .lottie-modal-animation,
    .lottie-modal-dialog.error .lottie-modal-animation,
    .lottie-modal-dialog.warning .lottie-modal-animation,
    .lottie-modal-dialog.info .lottie-modal-animation {
        width: 180px;
        height: 180px;
    }
    
    /* Success animation with specific sizing for optimal display on mobile */
    .lottie-modal-dialog.success .lottie-modal-animation {
        width: 220px;
        height: 220px;
    }
    
    /* Loading animation can remain smaller on mobile */
    .lottie-modal-dialog.loading .lottie-modal-animation {
        width: 100px;
        height: 100px;
    }
    
    .lottie-modal-title {
        font-size: 20px;
    }
    
    .lottie-modal-message {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .lottie-modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .lottie-modal-button {
        width: 100%;
        padding: 12px;
    }
} 