/* Enhanced popup centering styles */

.notice.notice-success {
    color: #07f773;
}
.notice.notice-error {
    color: #f70707;
}

.send-file-link-form {
    margin-top: 15px;
}

/* .send-file-link-form label {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: #555;
} */
.wp-whatsform-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.wp-whatsform-form input,
.wp-whatsform-form select,
.wp-whatsform-form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px!important;
    font-size: 14px;
    background: transparent!important;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Focus effect */
.wp-whatsform-form input:focus,
.wp-whatsform-form select:focus,
.wp-whatsform-form textarea:focus {
    border-color: #ccc!important; 
    box-shadow: none!important;
    outline: none!important;
    background: transparent!important;
}

.send-file-link-form .wp-whatsform-send {
    background-color: #030783;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.wpwf-popup-button{
    text-align: right;
}

.send-file-link-form .wp-whatsform-send:hover {
    background-color: #0309ad;
}

.wpwf-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wpwf-spinner.show {
    display: inline-block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Enhanced popup centering - Perfect middle positioning */
.wpwf-popup {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wpwf-popup-content {
    background-color: #fff;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 6px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(1);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

/* Animation when popup appears */
.wpwf-popup[style*="display: block"] .wpwf-popup-content {
    animation: popupAppear 0.3s ease-out forwards;
}

@keyframes popupAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wpwf-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.wpwf-close:hover {
    color: #000;
    background-color: #f0f0f0;
}

.wpwf-success {
    color: #19ae5c;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background-color: #f0f8f0;
    border: 1px solid #d4edda;
    border-radius: 4px;
}

.wpwf-error {
    color: #f00;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .wpwf-popup {
        padding: 10px;
    }

    .wpwf-popup-content {
        padding: 15px;
        max-width: none;
        margin: 0;
    }

    .send-file-link-form input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Ensure popup stays centered even with different content heights */
@media (max-height: 600px) {
    .wpwf-popup-content {
        max-height: 80vh;
    }
}