/* 
Theme Name: HDF Theme
Theme URI: https://github.com/elementor/hello-theme-child/
Description: HDF Theme is a child theme of Hello Elementor for HDF.
Author: Yes Web Design Studio
Author URI: https://yeswebdesignstudio.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: yes-web-design-studio
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */
.donate-form {
    
    background-color:rgba(243, 243, 243, 1);
    border-radius: 20px;
    margin: 0 auto;
    padding:  40px;
}

.donate-form label {
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 400;
    font-size: 14px;
    display: flex;
    flex-direction: column;
}

.donate-form select {
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 400;
    font-size: 14px;
}

.donate-form label input,
.donate-form label select,
.donate-form label textarea {
    margin-top: 10px;
}
.donate-form input::placeholder{
    color: rgba(205, 205, 205, 0.603);
}
/*.donate-form select{
    border-radius: 20px;
    border: none;
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: rgba(205, 205, 205, 0.603);
}*/
.donate-form select option:checked{
     color: #333;
}
.donate-form input[type="text"],
.donate-form input[type="email"],
.donate-form input[type="number"],
.donate-form input[type="tel"],
.donate-form select,
.donate-form textarea {
    border-radius: 20px;
    border: none;
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #666;
}

.donate-form input::placeholder,
.donate-form textarea::placeholder {
    color: rgba(205, 205, 205, 0.603);
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 400;
    font-size: 16px;
}

/* Style : checkbox */

.donate-form label.checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 20px;
    gap: 10px;
}

.donate-form label.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    vertical-align: middle;
}

/* Style : Button */

.donate-form button {
    display: block;
    margin:30px auto 0;
    font-family: Verdana, Geneva, sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: rgba(8, 80, 102, 1);
    justify-content: center;
    border: none;
    border-radius: 20px;
    background-color: rgba(255, 215, 33, 1);
}

.donate-form button:hover {
    color: rgba(8, 80, 102, 1);
    background-color: rgba(255, 215, 33, 1);
}

/* Style : Last text */

.donate-form p {
    text-align: center;
    margin-top: 30px;
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 400;
    font-size: 14px;
}

/* Style : hr (line) */

.donate-form hr {
    display: block !important;
    width: 100% !important;
    height: 1px !important;
    margin: 30px 0 0 0 !important;
    border: none !important;
    background-color: rgba(182, 182, 182, 0.66) !important;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1; /* ให้แต่ละกล่องกว้างเท่า ๆ กัน */
}

.form-row label {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.form-row select,
#currencySelect{
    appearance: none;            /* modern browsers */
    -webkit-appearance: none;    /* Safari/Chrome */
    -moz-appearance: none;       /* Firefox */
      padding-left: 17px;
      background: url("/wp-content/uploads/2025/09/keyboard_arrow_right.svg") no-repeat right 14px center;
      background-size: 24px;
      background-color: #FFFFFF;
}
#currencySelect{
    background: url("/wp-content/uploads/2025/09/keyboard_arrow_right.svg") no-repeat right 5px center;
}
.form-row select option{
    color: #656565;
    border-color: #ddd;
}
/* Style : HDF Program */

.form-row-hdf,
.form-row-payment1,
.form-row-payment2,
.form-row-amount
 {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-row-hdf > label,
.form-row-payment1 > label,
.form-row-payment2 > label,
.form-row-amount > label {
    margin-bottom: 10px;
    font-family: 'Wix Madefor Display', sans-serif;
    font-size: 14px;
}

/* ปุ่มเลือกโปรแกรม */
.donate-form .hdf-program-buttons button,
.donate-form .payment-option-buttons button,
.donate-form .payment-method-buttons button,
.donate-form .amount-buttons button,
#customAmount,
#currencySelect {
  display: inline-block;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid #fff;
  border-radius: 20px;
  background-color: #fff;
  cursor: pointer;
  font-family: 'Wix Madefor Display', sans-serif;
  font-size: 14px;
  font-weight: normal;
  color: #000;
  transition: all 0.2s;
}

#customAmount {
    width: 460px;
}

#currencySelect {
    width: 85px;
    /*text-align: center;*/
}

/* ปุ่มตอนเลือกแล้ว */
.donate-form .hdf-program-buttons button.active,
.donate-form .payment-option-buttons button.active,
.donate-form .payment-method-buttons button.active,
.donate-form .amount-buttons button.active,
.donate-form .payment-method-buttons button.is-active{
  border: 1px solid #1182A2;
  color: #000000;
}

button.visa-img img,
button.master-img img {
    max-height: 12px;
}
.donate-form button.is-active {
  /*outline: 2px solid #3b82f6;*/
  background: #eaf2ff;
  border-color: #1182A2;
}
/* ปุ่ม Donate Now ให้ใช้สไตล์เดิม */
.donate-form > button[type="submit"] {
  display: block;
  margin: 30px auto 0;
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: rgba(8, 80, 102, 1);
  border: none;
  border-radius: 20px;
  background-color: rgba(255, 215, 33, 1);
  padding: 12px 24px;
}
p.field-error{ 
    color:#b91c1c; 
    margin:.5rem 0 0; 
    font-size:.9rem;
    text-align: left;
}
/*.donate-form button.is-active{ outline:2px solid #3b82f6; background:#eaf2ff; }*/
:root{
    --bg:#f7f7f7;
    --muted:#cfcfcf;
    --input-bg: #fff;
    --accent: #f2f4f7;
    --primary-text: #333;
  }
  
  .field-label{ 
    font-size: 14px; 
    color: #9b9b9b; 
    margin-bottom: 8px; 
  }
  .phone-wrapper{ 
    margin-top: 10px;
   }

  .phone-field {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: 28px;
    padding: 0 5px;
    gap: 5px;
    border: 1px solid rgba(0,0,0,0.05);
  }
  .phone-field button,
  .phone-field input{
    margin: 0;
  }
  .country-select {
    position: relative;
    display: inline-flex;
    align-items: top;
    gap: 8px;
    background: var(--accent);
    padding: 6px 10px;
    border-radius: 18px;
    cursor: pointer;
    user-select: none;
    min-width: 86px;
    border: none;
  }

  .country-flag{ 
    width: 20px; 
    height: 20px; 
    display:inline-flex; 
    align-items:center; 
    justify-content:center; 
    font-size:14px; 
    line-height:1; 
    background:white; 
    border-radius:50%; 
    overflow: hidden;
  }
  #phone-field button{
    background-color: #EFEFEF;
    padding: 5px 7px;
    display: flex;
    align-items: center;
    font-family: 'Wix Madefor Display', sans-serif;
    font-weight: 400;
  }
  #phone-field input{
    margin-top: 0;
  }
  #phone-field button.country-select .country-flag img.emoji{
    height: 1.5em !important;
    width: 1.5em !important;
    transform: scale(1.5);
  } 
  #countryItems .country-item .country-flag{
    border-radius: 0;
  }
  #countryItems .country-item .country-flag img.emoji{
    height: 1.5em !important;
    width: 1.5em !important;
  }
  .country-code{ 
    font-size:14px; color:#444; 
  }
  .country-select .chev{ 
    margin-left:4px; 
    width:12px; 
    height:12px; 
    transform:translateY(1px); 
    opacity:.8; 
  }

  .phone-input { 
    border: none; 
    outline: none; 
    font-size: 16px; 
    flex: 1; 
    background: transparent; 
    padding: 6px 8px; 
    color: #333; 
  }

  .country-list {
    position: absolute;
    left: 8px;
    top: calc(100% + 8px);
    width: 420px;
    max-height: 320px;
    overflow: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(32,32,32,0.12);
    border: 1px solid rgba(0,0,0,0.06);
    z-index: 50;
    padding: 8px;
    display: none;
  }
  .country-list.show { 
    display:block; 
  }

  .country-search{
    display:flex;
    gap:8px;
    align-items:center;
    padding:6px;
    margin-bottom:6px;
  }
  .country-search input{
    flex:1;
    padding:8px 10px;
    border-radius:6px;
    border:1px solid #e6e6e6;
    outline:none;
  }

  .country-item {
    display:flex;
    gap:12px;
    align-items:center;
    padding:8px;
    border-radius:6px;
    cursor:pointer;
    white-space:nowrap;
  }
  .country-item:hover, .country-item[aria-selected="true"]{ 
    background:#f5f7fb; 
  }
  .country-item .meta{ 
    display:flex; 
    flex-direction:column; 
    line-height:1; }
  .country-item .name{ 
    font-size:14px; 
    color:#222; 
    display: none;
  }
  .country-item .dial{ 
    font-size:13px; 
    color:#666; 
  }

  .sr-only { 
    position:absolute !important; 
    height:1px; 
    width:1px; 
    overflow:hidden; 
    clip:rect(1px,1px,1px,1px); 
    white-space:nowrap; 
  }
.payment-method-buttons button.unsupported { 
    opacity:0.5; 
    cursor: not-allowed; 
    pointer-events: none;
}
@media (max-width:820px){
    #customAmount{
        width: 280px;
    }
    .form-row-payment2 .payment-method-buttons button{
        margin: 0 0 5px 0;
    }
}
/* small responsive */
@media (max-width:520px){
    .country-list{ width: 92vw; left: 4px; right: 4px; }
    .donate-form{
        padding: 40px 20px;
    }
    .form-row{
        flex-direction: column;
        gap: 0;
    }
    #customAmount{
        width: 260px;
    }
    .form-row-amount .amount-buttons button{
        margin: 0 0 5px 0;
    }
}
