/* Container của form */
.pcp-container {
    max-width: 450px; /* Điều chỉnh chiều rộng cho gọn hơn */
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

/* Wrapper cho form */
.pcp-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Khoảng cách giữa các nhóm input */
}

/* Form chính */
.pcp-form {
    display: flex;
    flex-direction: column; /* Sắp xếp theo chiều dọc */
    gap: 15px; /* Khoảng cách giữa các input group */
    justify-content: center;
    width: 100%; /* Đảm bảo form chiếm đủ chiều rộng */
}

/* Input group */
.pcp-input-group {
    display: flex;
    flex-direction: column;
    align-items: center; /* Căn giữa các input */
    width: 100%;
}

.pcp-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    text-align: center;
}

.pcp-input-group input[type="text"] {
    width: 100%; /* Chiếm toàn bộ chiều rộng của group */
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box; /* Đảm bảo padding không làm tăng chiều rộng */
    outline: none;
    transition: border-color 0.3s;
    text-align: center; /* Để placeholder căn giữa như ảnh */
}

.pcp-input-group input[type="text"]:focus {
    border-color: #007bff;
}

/* Button group */
.pcp-button-group {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.pcp-submit-button {
    background-image: linear-gradient(to right, #007bff, #0056b3); /* Màu gradient như ảnh */
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-image 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    width: 100%; /* Chiếm toàn bộ chiều rộng có sẵn */
}

.pcp-submit-button:hover {
    background-image: linear-gradient(to right, #0056b3, #004085);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.pcp-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-image: linear-gradient(to right, #91b8e4, #6a95cc);
}

/* Message area */
.pcp-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    color: #333;
    width: 100%;
}

.pcp-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.pcp-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ============================
   Popup Styles
   ============================ */
.pcp-popup {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 10000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    display: flex; /* Dùng flexbox để căn giữa */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Hiệu ứng làm mờ nền */
}

.pcp-popup-content {
    background-color: #fefefe;
    margin: auto; /* Căn giữa nếu không dùng flex */
    padding: 30px;
    border: 1px solid #888;
    width: 80%; /* Could be responsive */
    max-width: 500px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: fadeInScale 0.3s ease-out; /* Hiệu ứng mở popup */
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


.pcp-close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.pcp-close-button:hover,
.pcp-close-button:focus {
    color: black;
    text-decoration: none;
}

#pcp-popup-body {
    padding: 10px;
    max-height: 400px; /* Giới hạn chiều cao cho nội dung popup */
    overflow-y: auto; /* Thêm scrollbar nếu nội dung dài */
    text-align: left; /* Đặt lại text-align cho nội dung */
}

#pcp-popup-body h2,
#pcp-popup-body h3 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

#pcp-popup-body p {
    margin-bottom: 10px;
    line-height: 1.5;
}

#pcp-popup-body ul {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 0;
}

#pcp-popup-body li {
    margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pcp-container {
        width: 90%;
        padding: 20px;
    }
    .pcp-input-group {
        width: 100%;
    }
    .pcp-submit-button {
        padding: 10px 20px;
        font-size: 16px;
    }
    .pcp-popup-content {
        width: 95%;
        padding: 20px;
    }
}