.ftds-form{
  background:#fff;
  padding:16px;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.ftds-row{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:20px;
}

.ftds-col{
  display:flex;
  flex-direction:column;
}

.ftds-col.full{
  grid-column:1/-1;
}

.ftds-col label{
  font-weight:600;
  margin-bottom:6px;
  color: #333 !important;
}

#ftds-result, .ftds-modal-box p {
  color: #333 !important;
}

.ftds-col input,
.ftds-col select{
  padding:10px 12px;
  border-radius:8px;
  border:1px solid #ddd;
}

.ftds-btn{
  background:#2563eb;
  color:#fff;
  padding:12px 20px;
  border:none;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  width: 100%;
}

@media(max-width:768px){
  .ftds-row{
    grid-template-columns:1fr;
  }
}

/* ===== RESET FORM WIDTH ===== */
#ftds-form,
#ftds-form * {
    box-sizing: border-box;
}

/* ===== GRID 2 CỘT ===== */
.ftds-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ftds-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== INPUT / SELECT / TEXTAREA ===== */
#ftds-form input,
#ftds-form select,
#ftds-form textarea {
    width: 100%;
    max-width: 100%;
}

/* ===== SELECT2 FIX ===== */
.select2-container {
    width: 100% !important;
    max-width: 100%;
}

.select2-selection {
    width: 100% !important;
}

/* ===== WP EDITOR FIX ===== */
#ftds-form .wp-editor-wrap,
#ftds-form .wp-editor-container,
#ftds-form iframe {
    max-width: 100%;
}

/* ===== IMAGE PREVIEW ===== */
#ftds-form img {
    max-width: 100%;
    height: auto;
}


/* spinner */
/* ===== LOADING OVERLAY CENTER ===== */
.ftds-loading{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: rgba(255, 255, 255, 0.8);

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 99999;
}

.ftds-loading > div{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15%;
}

.ftds-spinner{
    width: 52px;
    height: 52px;
    border: 5px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ftds-spin 0.9s linear infinite;
}

.ftds-loading-text{
    margin-top: 14px;
    font-weight: 600;
    color: #374151;
}

@keyframes ftds-spin {
    to { transform: rotate(360deg); }
}



/* ===== SUCCESS MODAL ===== */
.ftds-modal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);

    display: flex;              /* 👈 LUÔN FLEX */
    align-items: center;
    justify-content: center;

    visibility: hidden;         /* 👈 Ẩn bằng visibility */
    opacity: 0;

    z-index: 100000;
    transition: opacity .2s ease, visibility .2s ease;
}


.ftds-modal-box{
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    animation: ftds-pop .25s ease;
}

.ftds-modal-icon{
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ftds-modal-actions{
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.ftds-modal-actions button{
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

#ftds-close-modal{
    background: grey;
}

#ftds-new-post{
    background: #2563eb;
    color: #fff;
}

.ftds-modal.is-active{
    visibility: visible;
    opacity: 1;
}


@keyframes ftds-pop{
    from{ transform: scale(.9); opacity:0 }
    to{ transform: scale(1); opacity:1 }
}
