
#custom-corporate-download-form {
    max-width: 100%;
    margin: 0px auto;
    font-family: sans-serif;
}

#custom-corporate-download-form .acf-form-fields {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 15.29px;
}

#custom-corporate-download-form .acf-field {
    border: none !important;
    padding: 00 !important;
    margin: 0;
}


#custom-corporate-download-form .acf-label {
    margin-bottom: 8px !important;
}
#custom-corporate-download-form .acf-label label {
    font-weight: 700;
    color: #1E293B;
    font-size: 13px;
    line-height: 22.1px;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

#custom-corporate-download-form .acf-required {
    color: transparent;
    font-size: 0;
}
/* Áp dụng badge "Bắt buộc" cho TẤT CẢ các thẻ label (kể cả label của checkbox) */
#custom-corporate-download-form label .acf-required::after,
#custom-corporate-download-form .acf-required::after,
#custom-corporate-download-form .acf-field[data-name="privacy_policy"] .acf-checkbox-list li label::after {
    content: "必須";
    font-size: 10px;
    background-color: #FEE2E2;
    color: #DC2626;
    padding: 2px 6px;
    margin-left: 10px;
    border-radius: 2px;
    font-weight: normal;
}


#custom-corporate-download-form .acf-input input[type="text"],
#custom-corporate-download-form .acf-input input[type="email"],
#custom-corporate-download-form .acf-input input[type="number"],
#custom-corporate-download-form .acf-input input[type="tel"],
#custom-corporate-download-form .acf-input textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #D5E3F0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background-color: #fff;
    border-radius: 4px !important;
    line-height: 100%;
}

#custom-corporate-download-form .acf-input input[type="text"]::placeholder,
#custom-corporate-download-form .acf-input input[type="email"]::placeholder,
#custom-corporate-download-form .acf-input input[type="number"]::placeholder,
#custom-corporate-download-form .acf-input input[type="tel"]::placeholder,
#custom-corporate-download-form .acf-input textarea::placeholder {
    color: #757575;
}

#custom-corporate-download-form .acf-input textarea {
    min-height: 150px;
}


#custom-corporate-download-form .acf-input input::placeholder,
#custom-corporate-download-form .acf-input textarea::placeholder {
    color: #94a3b8;
}


#custom-corporate-download-form .acf-input input:focus,
#custom-corporate-download-form .acf-input textarea:focus {
    outline: none;
    border-color: #3b82f6;
}


#custom-corporate-download-form .acf-field-checkbox {
    margin-top: 0px !important;
}
#custom-corporate-download-form .acf-checkbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
#custom-corporate-download-form .acf-checkbox-list li {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #64748b;
}
#custom-corporate-download-form .acf-checkbox-list input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
#custom-corporate-download-form .acf-checkbox-list li label {
    display: flex;
    align-items: center;
}

#custom-corporate-download-form .acf-field[data-name="privacy_policy"] > .acf-label {
    display: none !important;
}

#custom-corporate-download-form .acf-field[data-name="privacy_policy"] .acf-checkbox-list li label a {
    color: #1585C9;
    text-decoration: underline;
    margin-right: 4px;
}



#custom-corporate-download-form .acf-form-submit {
    text-align: center;
    margin-top: 30px;
}
#custom-corporate-download-form .acf-form-submit .acf-button {
    background-color: #EA4044;
    color: #fff;
    padding: 14px 40px;
    border-radius: 4px;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    min-width: 456px;
    transition: background-color 0.2s ease;
}
#custom-corporate-download-form .acf-form-submit .acf-button:hover {
    background-color: #EA4044;
}

.acf-notice.-error.acf-error-message.-dismiss {
    display: none !important;
}

/* ========================================
   Document Selection — Card UI
   (replaces ACF Post Object select2)
======================================== */

/* Hide mọi thứ bên trong .acf-input của field document_selection,
   CHỈ giữ lại card list và script của chúng ta */
#custom-corporate-download-form .acf-field[data-name="document_selection"] .acf-input > *:not(.doc-card-list):not(script) {
    display: none !important;
}

/* Ẩn select2 container span (tất cả state: focus, below, above, open...) */
#custom-corporate-download-form .acf-field[data-name="document_selection"] .select2-container,
#custom-corporate-download-form .acf-field[data-name="document_selection"] span.select2,
#custom-corporate-download-form .acf-field[data-name="document_selection"] .select2.select2-container,
#custom-corporate-download-form .acf-field[data-name="document_selection"] .select2-container--default {
    display: none !important;
}

/* Ẩn hidden select gốc của ACF */
#custom-corporate-download-form .acf-field[data-name="document_selection"] select {
    display: none !important;
}

/* Card list wrapper */
.doc-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Single card */
.doc-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1.5px solid #D5E3F0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    user-select: none;
}

.doc-card-item:hover {
    border-color: #1585C9;
    background: #F0F8FF;
}

/* Selected state */
.doc-card-item.is-selected {
    border-color: #1585C9;
    background: #EBF5FF;
}

/* Hide native checkbox — replaced by custom box */
.doc-card-item .doc-card-check {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #CBD5E1;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    position: relative;
    flex-shrink: 0;
}

.doc-card-item .doc-card-check:checked {
    background: #1585C9;
    border-color: #1585C9;
}

/* Checkmark */
.doc-card-item .doc-card-check:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* Document icon */
.doc-card-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Document title text */
.doc-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.4;
}

.doc-card-empty {
    font-size: 13px;
    color: #94a3b8;
    padding: 10px 0;
}
