/**
 * BotFlow Form Success Modal Styles
 * Responsive modal with BotFlow branding
 * Version: 1.0
 */

/* Modal Overlay */
.bf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(5 5 5 / 95%);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.bf-modal-overlay.bf-modal-show {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.bf-modal-content {
    background: #121212;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    max-width: 640px;
    width: 100%;
    max-height: 100vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.bf-modal-show .bf-modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.bf-modal-header {
    padding: 32px 32px 0 32px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    position: relative;
}

.bf-modal-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #050505;
    margin: 0;
    background: linear-gradient(135deg, #00D47E 0%, #00B86B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    width: 100%;
    margin-bottom: 24px;
    margin-top: 10px;
}

.bf-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #B8B8B8;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
}

.bf-modal-close:hover {
    background: #f5f5f5;
    color: #333;
    transform: scale(1.1);
}

.bf-modal-close:active {
    transform: scale(0.95);
}

/* Modal Body */
.bf-modal-body {
    padding: 0 32px 32px 32px;
    text-align: center;
}

.bf-success-icon {
    margin-bottom: 0;
    text-align: center;
}

.bf-success-icon svg {
    color: #00D47E;
    width: 64px;
    height: 64px;
    stroke-width: 2;
}

.bf-modal-message {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #b8b8b8;
    margin: 0 0 16px 0;
    font-weight: 300;
}

.bf-modal-details {
    margin-top: 20px;
}

.bf-modal-details small {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #B8B8B8;
    font-style: inherit;
    font-weight: 300;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bf-modal-overlay {
        padding: 20px;
        align-items: center;
        justify-content: center;
    }
    
    .bf-modal-content {
        border-radius: 12px;
        max-height: 85vh;
        margin: 0;
        width: 100%;
        max-width: calc(100% - 40px);
    }
    
    .bf-modal-header {
        padding: 20px 20px 0 20px;
    }
    
    .bf-modal-title {
        font-size: 20px;
    }
    
    .bf-modal-body {
        padding: 0 20px 24px 20px;
    }
    
    .bf-success-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .bf-modal-message {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .bf-modal-overlay {
        padding: 16px;
        align-items: center;
        justify-content: center;
    }
    
    .bf-modal-content {
        border-radius: 8px;
        width: 100%;
        max-width: calc(100% - 32px);
        margin: 0;
    }
    
    .bf-modal-header {
        padding: 16px 16px 0 16px;
    }
    
    .bf-modal-title {
        font-size: 18px;
    }
    
    .bf-modal-body {
        padding: 0 16px 20px 16px;
    }
    
    .bf-modal-message {
        font-size: 14px;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .bf-modal-content {
        background: #1a1a1a;
        border: 1px solid #333;
    }
    
    .bf-modal-title {
        color: #ffffff;
    }
    
    .bf-modal-header {
        border-color: #333;
    }
    
    .bf-modal-message {
        color: #e0e0e0;
    }
    
    .bf-modal-details small {
        color: #aaa;
    }
    
    .bf-modal-close {
        color: #ccc;
    }
    
    .bf-modal-close:hover {
        background: #333;
        color: #fff;
    }
}

/* Accessibility */
.bf-modal-overlay {
    scroll-behavior: smooth;
}

.bf-modal-content:focus {
    outline: 2px solid #00D47E;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .bf-modal-overlay,
    .bf-modal-content,
    .bf-modal-close {
        transition: none;
    }
    
    .bf-modal-show .bf-modal-content {
        transform: none;
    }
}