/**
 * CSS for the responsive popup modal.
 */

/* 1. Lớp nền mờ toàn màn hình */
.verdaagro-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.verdaagro-popup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* 2. Khung chứa nội dung popup */
.verdaagro-popup-wrapper {
    position: relative;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 680px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.verdaagro-popup-overlay.is-visible .verdaagro-popup-wrapper {
    transform: scale(1);
}

.verdaagro-popup-banner {
    /* Assuming the banner has a logo and a product image, which are not provided. */
    /* This is a placeholder for the banner background */
    /* background: #f0f2f5;
    padding: 20px; */
    text-align: center;
}

.verdaagro-popup-banner img {
    max-width: 100%;
    height: auto;
}

.verdaagro-popup-inner-content {
    padding: 20px 40px;
    text-align: center;
}

.verdaagro-popup-title {
    color: #f39c12; /* Orange-ish color */
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 10px;
}

.verdaagro-popup-subtitle {
    color: #555;
    font-size: 16px;
    margin-bottom: 20px;
}

.verdaagro-popup-content {
    background: #f9f9f9;
}

/* Form Styles */
.wpcf7-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.wpcf7-form p {
    width: 100%;
    margin-bottom: 15px;
}

.wpcf7-form-control-wrap {
    display: block;
}

.wpcf7-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: left;
    color: #333;
}

.wpcf7-form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.wpcf7-form .your-name,
.wpcf7-form .your-email {
    width: calc(50% - 10px);
}

.wpcf7-form .detail-order {
    width: 100%;
}

.wpcf7-textarea {
    height: 120px;
    resize: vertical;
}

.wpcf7-submit {
    background-color: #004d40; /* Dark teal */
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: auto;
    margin: 0 auto;
    display: block;
}

/* 4. Chân popup (chứa checkbox) */
.verdaagro-popup-footer {
    padding: 20px 40px;
    background-color: #f9f9f9;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    text-align: center;
}

.verdaagro-popup-social-icons {
    margin-bottom: 15px;
}

.verdaagro-popup-social-icons a {
    color: #004d40; /* Dark teal */
    font-size: 24px;
    margin: 0 10px;
    text-decoration: none;
}

.verdaagro-popup-footer label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.verdaagro-popup-footer input[type="checkbox"] {
    margin-right: 8px;
}

/* 5. Nút đóng popup */
.verdaagro-popup-close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    font-size: 24px;
    color: #888;
    text-decoration: none;
    background: #f0f0f0;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.verdaagro-popup-close:hover {
    color: #fff;
    background: #e74c3c;
    transform: rotate(90deg);
}

/* 6. Responsive cho màn hình di động */
@media (max-width: 768px) {
    .verdaagro-popup-title{
      font-size: 19px;
    }
    .verdaagro-popup-inner-content {
        padding: 20px;
    }

    .wpcf7-form .your-name,
    .wpcf7-form .your-email {
        width: 100%;
    }

    .verdaagro-popup-footer {
        padding: 20px;
    }
}

body.verdaagro-popup-active {
    overflow: hidden; /* Ẩn thanh cuộn */
    height: 100vh;    /* Giữ chiều cao cố định để tránh nhảy layout */
}
