/* WAPF Modal Styles */

/* Modal Trigger Button */
.wapf-modal-trigger-container {
    margin: 15px 0;
}

.wapf-open-modal-btn {
    background-color: #0073aa;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wapf-open-modal-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.wapf-open-modal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modal Overlay */
.wapf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wapf-fade-in 0.3s ease;
}

@keyframes wapf-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.wapf-modal-container {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: wapf-slide-up 0.3s ease;
}

@keyframes wapf-slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.wapf-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.wapf-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* Modal Close Button */
.wapf-modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wapf-modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

.wapf-modal-close:active {
    background-color: #d0d0d0;
}

/* Modal Body */
.wapf-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.wapf-modal-body::-webkit-scrollbar {
    width: 8px;
}

.wapf-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.wapf-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.wapf-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wapf-modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .wapf-modal-header {
        border-radius: 0;
        padding: 16px 20px;
    }

    .wapf-modal-header h3 {
        font-size: 18px;
    }

    .wapf-modal-body {
        padding: 20px;
    }

    .wapf-modal-overlay {
        padding: 0;
    }
}

/* Additional spacing for fields inside modal */
.wapf-modal-body .wapf-field-container {
    margin-bottom: 20px;
}

.wapf-modal-body .wapf-field-container:last-child {
    margin-bottom: 0;
}
