/*
Theme Name: Hello Elementor Child
Theme URI: https://elementor.com/
Description: A child theme for Hello Elementor
Author: Your Name
Author URI: https://yourwebsite.com/
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-child
*/

* {
    box-sizing: border-box;
    outline: none;
    margin: 0;
    padding: 0;
    direction: rtl;
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: #fff;
}

::-webkit-scrollbar-thumb {
    background-color: var(--e-global-color-primary);
    border-radius: 20px;
}

button {
    font-family: "IRANSans", Sans-serif;
    font-weight:600;
}

.form-container h2 {
font-size: 22px;
text-align: center;
color: #2c3e50;
margin-bottom: 30px;
}


.form-row .form-group {
flex: 1;
min-width: 140px;
}

.form-group {
margin-bottom: 18px;
}

.form-group label {
display: block;
margin-bottom: 6px;
font-weight: 500;
color: #444;
}

.form-group textarea {
resize: vertical;
min-height: 70px;
}


.warranty-options {
display: flex;
gap: 20px;
flex-wrap: wrap;
margin-top: 8px;
}
.warranty-options label {
font-size: 14px;
display: flex;
align-items: center;
gap: 6px;
}

.form-actions {
display: flex;
justify-content: space-between;
gap: 15px;
margin: 25px 0 15px;
flex-wrap: wrap;
}

.icon-button {
flex: 1;
background-color: #eef3fc;
border: 1px solid #4a90e2;
color: #2d6cdf;
border-radius: 10px;
font-size: 16px;
padding: 12px;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
text-align: center;
}

.icon-button:hover {
background-color: #d0e3ff;
color: #1c4fb3;
}

.form-submit {
text-align: center;
}

@media (max-width: 540px) {
.form-row {
flex-direction: column;
}

.form-actions {
flex-direction: column;
}

.form-submit button {
width: 100%;
}
}

.input-with-button .input-wrapper {
position: relative;
display: flex;
}

.input-with-button .input-wrapper input,
.input-with-button .input-wrapper textarea {
padding-left: 40px;
padding-right: 12px;
width: 100%;
resize: vertical;
}

.inline-icon {
position: absolute;
left: 5px;
top: 50%;
transform: translateY(-50%);
background: #eef3fc;
border: 1px solid #4a90e2;
color: #2d6cdf;
font-size: 18px;
padding: 5px 10px;
border-radius: 8px;
cursor: pointer;
transition: 0.3s ease;
z-index: 2;
}

.inline-icon:hover {
background-color: #d0e3ff;
color: #1c4fb3;
}


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

.form-group {
margin-bottom: 20px;
flex: 1;
min-width: 180px;
}

label {
display: block;
margin-bottom: 6px;
font-weight: bold;
}

.required-label {
color: #d22;
font-size: 13px;
}

input,
select,
textarea {
    font-family: "IRANSans", Sans-serif;
width: 100%;
padding: 10px 14px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 14px;
box-sizing: border-box;
}

textarea {
resize: vertical;
}

.form-submit {
text-align: center;
margin-top: 20px;
}

#map-container {
display: none;
margin-top: 15px;
}

#map {
height: 320px;
width: 100%;
border-radius: 12px;
}

.map-toggle {
background-color: #eef3fc;
color: #2d6cdf;
padding: 10px 14px;
border: 1px solid #4a90e2;
border-radius: 8px;
cursor: pointer;
}

.map-toggle:hover {
background-color: #dce8ff;
}

.location-box {
border: 1px solid #e0e0e0;
border-radius: 8px;
overflow: hidden;
margin-bottom: 20px;
}

.map-box {
height: 220px;
}

.location-actions {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
background: #f9f9f9;
}

#my-location-btn {
    flex: 1 1 auto;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
        background-color: transparent;
        color: #c36;
        border: 1px solid #c36;
}

#my-location-btn:hover {
    color:black;
}

#location-status {
    font-weight: 600;
font-size: 14px;
padding: 5px 10px;
border-radius: 6px;
background-color: #e8f0fe;
color: #2d6cdf;
transition: background-color 0.3s, color 0.3s;
}

.status.success {
background-color: #4caf50 !important;
color: white !important;
}


.leaflet-control-geocoder {
margin-top: 8px;
margin-right: 10px;
font-size: 13px;
z-index: 1000;
border: none !important;
}

.leaflet-control-geocoder-alternatives {
text-align: left;
border-top: 1px solid black;
}

@media (max-width: 600px) {
.form-row {
flex-direction: column;
}
}


.dropdown.open {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}


.dropdown-container .list-container.open {
display: block;
overflow-y: auto;
}


.form-container h2 {
    font-size: 22px;
    text-align: center;
    color: #2c3e50;
        margin-top: 25px;
    margin-bottom: 30px;
}

.form-group {
    flex: 1;
    min-width: 250px; 
    display: flex;
    flex-direction: column;
}

.form-group label,
.form-guarentee label {
    display: block;
    font-weight: 600;
    color: #555;
}

.leaflet-control-attribution {
    display:none;
}

.required-label {
    color: #aaa;
    font-weight: normal;
    font-size: 12px;
}

.list {
    padding: 10px;
    cursor: pointer;
}

.list:not(:last-child) {
    border-bottom: 1px solid #ddd;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007cba; 
    outline: none;
}

.validation-error {
    color: #dc3232; 
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group input:invalid,
.form-group textarea:invalid {
    
}

.guarentee-row {
    margin-bottom: 15px;
}

.form-guarentee {
    width: 100%;
}

.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    margin-bottom: 0;
}

#map {
    width: 100%;
    height: 250px;
    background-color: #e9e9e9;
    margin-bottom: 10px;
    border-radius: 4px;
}

.location-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.location-actions button {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.location-actions button img {
    display:none !important;
}

.location-actions button#clear-location-btn {
    background-color: #dc3232;
}

.status.success {
    color: #46b450;
}

.dropdown-container {
    position: relative;
}

.dropdown {
display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    background-color: #fff;
    border: 1px solid #ccc;
    appearance: none;
    outline: none;
    border-radius: 8px;
    cursor: pointer;
}

.dropdown::after {
    content: '▼';
    font-size: 12px;
}

.dropdown-container .list-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background-color: #fff;
    z-index: 9999;
    padding: 10px;
}

#deviceSearchBox, #brandSearchBox {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: none;
    border-bottom: 1px solid #eee;
}

.form-submit {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.form-submit button {
    width: 100%;
    padding: 12px 25px;
background-color: var( --e-global-color-accent );
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}



#messageBox {
    margin-top: 15px;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {

    .form-row {
        flex-direction: column;
        gap: 0; 
    }
    
    .form-group {
        min-width: 100%; 
        margin-bottom: 20px;
    }
    
    .form-row .form-group:last-child {
        margin-bottom: 0;
    }

    .location-actions {
        flex-direction: column;
        align-items: stretch; 
        gap: 10px;
    }
    

    .form-submit button {
        width: 100%;
    }
    .form-row.no-stack {
        flex-direction: row; 
        gap: 15px;
    }
    #location-status {
        text-align:center;
    }
}

.posts h2 {
  color: #303F9F !important;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 20px;

}

.posts h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8em;
  margin-top: 20px;
  color: #FF7400 !important;
}

.posts h4 {
  color: #000 !important;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6em;
  margin-bottom: 0;
  margin-top: 20px;
}

.posts h5 {
  color: #000 !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6em;
  margin-bottom: 0;
  margin-top: 20px;
}

.posts p[style*="text-align: center"] {
        text-align: right !important;
  background-color: #f2f5f5;
    border-right: 6px solid #FF7400;
    padding: 0px 10px;
    margin: 10px 0;
    border-radius: 10px;
    margin-right:0;
}



.posts .elementor-element-cb97f0a {
  padding: 0
}

.posts p[style*="text-align: center"] span {
  font-weight:700;

}

.posts .e-con-inner {
  gap: 0;
}

.posts img {
  border-radius: 10px !important;
  margin-bottom: 10px;
  display: flex;
  width: 100%;
  border-radius:10px !important;
}

.posts p {
  padding-bottom: 5px;
  line-height: 2.4rem;
  margin-block-end: unset;
  margin-bottom: 5px;
  text-align: justify;
  font-weight: 500;
}

.posts p span {
  font-size: 16px !important;
}

.posts a {
  font-size: 17px;
  color: #FF7400;
  font-weight: 600;
  background-color: transparent !important;
}

.posts ul {
  padding: 0px 7px 0px 7px;
  display: flex;
  flex-direction: column;
}

.posts ol {
  padding: 0px 7px 0px 7px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.posts ul li {
  align-items: baseline;
  position: relative;
  margin-right: 10px;
}

.posts ul li b {
  color: black;
}

.posts ol li {

  align-items: baseline;
  position: relative;
  padding: 5px 0px 5px 0px;
}

.posts table {
    width: 100% !important;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
    overflow-x: auto;
}

table, td, th {
    transition: background 0.2s;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, .1);
    text-align: center;
}

.posts table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

/*
  این کد اولین سطر از اولین بخش جدول (چه thead و چه tbody) را هدف می‌گیرد.
*/
table > :first-child > tr:first-child {
  background-color: #FF7400; /* رنگ سبز */
  color: white; /* رنگ متن سفید */
}

/*
  این قانون کمکی تضمین می‌کند که استایل به سلول‌های th هم برسد،
  چون گاهی مرورگرها استایل پیش‌فرض قوی‌تری برای th دارند.
*/
table > :first-child > tr:first-child th {
  background-color: inherit;
  color: inherit;
}


@media only screen and (max-width: 767px) {
  .posts h2 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7em;
    margin-bottom: 5px;
    margin-top: 3px;
  }

  .posts h3 {
    font-size: 15px;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 0px;
  }

  .posts h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5em;
    margin-bottom: 0px;
    margin-top: 10px;
  }

  .posts p {
    margin-bottom: 0px;
    margin-top: 3px;
  }

  .posts p[style*="text-align: center"] span {
    font-weight: 700 !important;
  }
  
  .posts p[style*="text-align: center"] a {
    font-size: 15px !important;
  }

  .main-heading h1 {
    font-size: 20px;
    line-height: 2.3rem;
  }

  .main-heading h2 {
    font-size: 18px;
  }

  .main-heading h3 {
    font-size: 18px !important;
  }

  .form .wpforms-field-label {
    font-size: 13px !important;
  }

  .form .wpforms-field-large {
    font-size: 13px !important;
  }
  .header-border .elementor-toc__header-title {
        border-bottom: none !important;
        text-align:right !important;
  }
  .elementor-toc__body {
      border-top: 1px solid !important;
    padding-top: 10px !important;
    margin-top: 0 !important;
  }
  .comment-slider .swiper-slide {
      min-height: 400px;
  height: auto;
  }
}