/**
 * Sendfox Popup Form Styles
 * Bottom slide-in popup with smooth animations
 */

/* Overlay - positioned at bottom, hidden by default */
.sendfox-popup-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
}

/* Active state - slide up into view */
.sendfox-popup-overlay.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Popup container */
.sendfox-popup-container {
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    margin: 0 auto;
    padding: 30px;
    position: relative;
    border-radius: 8px 8px 0 0;
}

/* Close button */
.sendfox-popup-container button.sendfox-popup-close {
    position: absolute;
    top: 6px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 10;
}

.sendfox-popup-container .sendfox-popup-close:hover {
    color: #333;
}

.sendfox-popup-container .sendfox-popup-close:focus {
    outline: 2px solid #D6B22F;
    outline-offset: 2px;
}

/* Popup content area */
.sendfox-popup-content {
    max-width: 100%;
}

/* Form styling */
.sendfox-popup-content .sendfox-form {
    margin: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: end;
    gap: 20px;
}

.sendfox-popup-content .sendfox-form p {
    margin: 0 0 15px 0;
}

.sendfox-popup-content .sendfox-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.sendfox-popup-content .sendfox-form input[type="text"],
.sendfox-popup-content .sendfox-form input[type="email"],
.sendfox-popup-content .sendfox-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    background-color: #fff;
}

.sendfox-popup-content .sendfox-form input[type="text"]:focus,
.sendfox-popup-content .sendfox-form input[type="email"]:focus,
.sendfox-popup-content .sendfox-form select:focus {
    border-color: #D6B22F;
    outline: none;
    box-shadow: 0 0 0 1px #D6B22F;
}

/* Checkbox styling */
.sendfox-popup-content .sendfox-form input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.sendfox-popup-content .sendfox-form label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    cursor: pointer;
}

/* Submit button */
.sendfox-popup-content .sendfox-form button[type="submit"] {
    background: #D6B22F;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
}

.sendfox-popup-content .sendfox-form button[type="submit"]:hover {
    background: #f0c838;
}

.sendfox-popup-content .sendfox-form button[type="submit"]:focus {
    outline: 2px solid #D6B22F;
    outline-offset: 2px;
}



/* Vertical layout for screens 1000px and below */
@media (max-width: 1000px) {
    .sendfox-popup-content .sendfox-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sendfox-popup-content .sendfox-form .sendfox_form_field {
        width: 100%;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .sendfox-popup-container {
        max-width: 100%;
        padding: 25px 20px;
        border-radius: 0;
    }
    
    .sendfox-popup-close {
        top: 10px;
        right: 10px;
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
    
    .sendfox-popup-content .sendfox-form input[type="text"],
    .sendfox-popup-content .sendfox-form input[type="email"],
    .sendfox-popup-content .sendfox-form select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .sendfox-popup-container {
        padding: 20px 15px;
    }
    
    .sendfox-popup-content .sendfox-form p {
        margin: 0 0 12px 0;
    }
}

/* Animation for form submission success */
.sendfox-form-success {
    animation: successFade 0.3s ease;
}

@keyframes successFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
