/* Định dạng chung */
.content-container {
    display: flex;
    justify-content: center;
    margin: 20px;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}
/* Bảng form */

.form-table-cus th{
	width: auto !important;
} 
/* Ô nhập liệu & textarea */
.form-table-cus input, textarea {
    width: 100%;  /* Chiếm toàn bộ chiều rộng */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box; /* Đảm bảo padding không làm tăng kích thước */
}

/* Responsive */
@media (max-width: 600px) {
    .form-table-cus th {
        display: block;
        text-align: left;
    }

    .form-table-cus td {
        display: block;
        width: 100%;
    }

    .form-table-cus input, textarea {
        font-size: 16px;
    }
}


/* Định dạng cột trái và phải */
.content-container .left-column, .right-column {
    flex: 1;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* Cột trái chiếm 60%, cột phải chiếm 35% */
.content-container .left-column {
    max-width: 60%;
}

.content-container .right-column {
    max-width: 35%;
}

/* Tiêu đề */
.content-container h1 {
    font-size: 20px;
    text-align: center;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}




/* Responsive cho Tablet */
@media (max-width: 1024px) {
    .content-container {
        flex-direction: column;
    }

   .content-container .left-column, .right-column {
        max-width: 100% !important;
    }
}

/* Responsive cho Mobile */
@media (max-width: 600px) {
    .content-container {
        margin: 10px;
    }
 	.content-container .left-column, .right-column {
        max-width: 100% !important;
    }


    h1 {
        font-size: 18px;
    }

    input, select, textarea {
        padding: 6px;
    }

    .button-primary {
        padding: 8px 12px;
    }
}


@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .container > div {
        width: 100%;
    }
}
/* Video Responsive */
.video-container {
    position: relative;
	text-align: center; /* Căn giữa các phần tử inline như label và a */
    width: 100%;
    max-width: 560px; /* Giới hạn kích thước */
    margin: 20px auto;
}

.video-container iframe {
    width: 100%;
    height: 315px;
    border-radius: 10px; /* Bo góc nhẹ */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Đổ bóng */
}

/* Responsive */
@media (max-width: 600px) {
    .video-container iframe {
        height: 250px;
    }
}
 .password-wrapper {
        display: flex;
        align-items: center;
        gap: 10px; /* Khoảng cách giữa input và nút */
    }

    .password-wrapper input {
        flex: 1; /* Input sẽ chiếm hết phần còn lại */
        padding-right: 40px; /* Chừa khoảng trống để nút không che mất chữ */
    }

    .password-wrapper button {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 16px;
        outline: none;
    }


.widefat_custom .license-note {
    width: 100%; /* Đảm bảo vừa cột */
    max-width: 180px; /* Giới hạn chiều rộng */
    height: auto; /* Tự điều chỉnh chiều cao */
    min-height: 30px; /* Chiều cao tối thiểu 1 dòng */
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none; /* Không cho resize theo chiều ngang */
    overflow: hidden; /* Ngăn tràn nội dung */
    white-space: nowrap; /* Giữ nội dung trên 1 dòng */
    box-sizing: border-box;
    text-align: center;
    display: block;
}

.widefat_custom .status-message {
    display: block;
    font-size: 12px;
    text-align: center;
    margin-top: 5px;
    white-space: nowrap; /* Ngăn không cho xuống dòng */
    color: #333;
}

.widefat_custom .wp-list-table {
    width: 100%;
    border-collapse: collapse;
}

.widefat_custom .wp-list-table th,
.widefat_custom .wp-list-table td {
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.widefat_custom .wp-list-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.widefat_custom .license-key {
    word-break: break-word;
}

.widefat_custom .expiry-date,
.widefat_custom .license-status-select,
.widefat_custom .license-note {
    width: 95%;
    padding: 5px;
    text-align: center;
    box-sizing: border-box;
}

.widefat_custom .button-danger {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease-in-out;
}

.widefat_custom .button-danger:hover {
    background-color: #c9302c;
}
/* Đảm bảo bảng không bị tràn trên mobile */
.wrap {
    overflow-x: auto;
    width: 100%;
}
/* Đảm bảo bảng không bị vỡ trên mobile */
.widefat_custom {
    overflow-x: auto;
    width: 100%;
    display: block;
}

/* Giữ bảng trong một khung cuộn ngang */
.widefat_custom .wp-list-table {
    min-width: 800px; /* Ngăn bảng bị co quá mức */
    white-space: nowrap;
}

/* Responsive cho các input, select, textarea */
.widefat_custom .expiry-date,
.widefat_custom .license-status-select,
.widefat_custom .license-note {
    width: 100%;
    max-width: 180px; /* Giới hạn chiều rộng */
    font-size: 14px;
}

/* Ẩn dropdown trên mobile */
@media (max-width: 768px) {
    .widefat_custom .license-status-select {
        display: none;
    }
}


/* Ẩn tiêu đề trên mobile và hiển thị nhãn trong mỗi ô */
@media (max-width: 768px) {
    .widefat_custom .wp-list-table thead {
        display: none; /* Ẩn tiêu đề */
    }

    .widefat_custom .wp-list-table tbody tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #ddd;
        padding: 10px;
    }

    .widefat_custom .wp-list-table td {
        display: flex;
        justify-content: space-between;
        text-align: left;
        padding: 8px;
        position: relative;
        font-size: 14px;
    }

    /* Tạo nhãn hiển thị trước mỗi ô dữ liệu */
    .widefat_custom .wp-list-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #333;
        flex-shrink: 0;
        margin-right: 8px;
    }

    /* Thu nhỏ nút */
    .widefat_custom .button {
        padding: 5px 8px;
        font-size: 12px;
    }
	/* Trạng thái xanh (Active) */
.widefat_custom .status-active::before {
    content: "✔"; 
    color: green;
    font-weight: bold;
    font-size: 18px;
}

/* Trạng thái đỏ (Expired hoặc Revoked) */
.widefat_custom .status-expired::before, 
.widefat_custom .status-revoked::before {
    content: "✖";
    color: red;
    font-weight: bold;
    font-size: 18px;
}

	
}
.address-item {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.address-item:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.address-item p {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 15px;
    margin: 0;
    align-items: center;
}

.address-item input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.remove-address {
    background-color: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 8px 15px !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.remove-address:hover {
    background-color: #c82333 !important;
}

#add_address {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

#add_address:hover {
    background-color: #218838;
}

.form-table td {
    padding: 15px 10px;
}

.description {
    color: #666;
    font-style: italic;
    margin-top: 8px;
}
/* Custom Checkbox Style */
.contact-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 0;
    user-select: none;
}

.contact-toggle input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    position: relative;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid #2271b1;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: all 0.2s ease;
}

.contact-toggle input[type="checkbox"]:checked + .checkbox-custom {
    background: #2271b1;
    border-color: #2271b1;
}

.contact-toggle input[type="checkbox"]:checked + .checkbox-custom::after {
    opacity: 1;
}

.label-text {
    font-size: 14px;
    color: #1d2327;
}

/* Hover effect */
.contact-toggle:hover .checkbox-custom {
    border-color: #135e96;
}

.contact-toggle:hover .label-text {
    color: #135e96;
}

/* Focus style */
.contact-toggle input[type="checkbox"]:focus + .checkbox-custom {
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}
.contact-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.contact-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Validation styles */
input[type="tel"]:invalid {
    border-color: #dc3232;
}

input[type="tel"]:valid {
    border-color: #46b450;
}
/* Ẩn trường keyword nếu có file Excel */
#file_excel:not(:empty) + tr {
    display: none;
} 
/* Overlay nền tối */
#popup-overlay {
    display: none;
    position: fixed;
    z-index: 9998;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
}

/* Popup ở giữa */
.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: fadeIn 0.3s ease-in-out;
}

/* Nội dung popup */
.popup-content {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    min-width: 280px;
    max-width: 90vw;
}

/* Hiệu ứng fade-in */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

  