/* ===== Finvacon Contact Form (front) ===== */
.fvc_box{
  --fvc-gap: 1rem;
  --fvc-pad: 2rem;
  background: #fafafa;
  border-radius: 0.3rem;          
  box-shadow: 0 0.4rem 1.4rem rgba(0,0,0,.1); 
  border: 1px solid #e1e1e1;
  padding: var(--fvc-pad);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  transform-origin: top;
}

/* Title */
h2.wp-block-heading.fvc_title { 
  margin: 0 0 1.6rem 1.5rem !important; 
  font-size: 1.8rem !important; 
  font-family: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Form grid */
.fvc_form{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--fvc-gap);
  width: 100%;
}

/* Per-field widths */
.fvc_field--company{ width: 28rem; min-width: 28rem; max-width: 28rem; }
.fvc_field--name{    width: 30rem; min-width: 30rem; max-width: 30rem; }
.fvc_field--email{   width: 32rem; min-width: 32rem; max-width: 32rem; }
.fvc_field--phone{   width: 34rem; min-width: 34rem; max-width: 34rem; }
.fvc_field--message{ width: 70%; min-width: 34rem; max-width: 62rem; }

/* Field wrapper */
.fvc_fieldwrap{ position: relative; }
form .fvc_fieldwrap label { 
  font-family: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  margin-left: 1.5rem;
}
form .fvc_fieldwrap input { 
  font-family: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 300;
  margin-left: 1.5rem;
}

/* Labels */
.fvc_label{
  display: block;
  margin: 0 0 .4rem 0;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: .5rem;
}

/* Inputs */
.fvc_input,
.fvc_textarea{
  font-family: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  width: 100%;
  color: #00619d; /* blue typing color */
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: .5rem; 
  padding: .9rem 1rem;
  outline: none;
  box-sizing: border-box;
  margin-left: 1.5rem;
}
.fvc_input:focus,
.fvc_textarea:focus{ border-color: #c7c7c7; }

/* Counters (desktop: at the right side of field) */
.fvc_counter{
  font-size: .9rem;
  opacity: .8;
  transition: opacity .15s ease;
}
.fvc_fieldwrap .fvc_counter{
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translate(7.15rem, 0);
}
.fvc_show_counter .fvc_counter[hidden]{ display: inline; }
.fvc_show_counter .fvc_counter{ opacity: 1; }

/* Privacy text */
.fvc_privacy{
  margin: .5rem 0 0 0;
  font-size: 1rem;
  font-family: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  transform: translateY(-0.5rem);
  margin-left: 1.5rem;
  min-width: 6rem;
  width: 70%;
}
.fvc_privacy a{ text-decoration: underline; }

/* Alert panel (hidden by default) */
.fvc_alert{
  background: #f0f0f0;           /* slightly darker gray */
  border: 4px solid #000;        /* distinct black border */
  padding: 1rem;
  margin: 0.5rem 3rem 0 2.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease, transform .25s ease;
  font-size: 1rem;
  width: 64vw;
  min-width: 6vw;
  max-width: 64vw;
}
.fvc_alert.is-visible{
  max-height: 20rem;             
}
.fvc_alert.fvc_shake{
  animation: fvc-shake .3s linear 1;
}
@keyframes fvc-shake{
  0%,100%{ transform: translateX(0); }
  20%{ transform: translateX(-1.5%); }
  40%{ transform: translateX(1.5%); }
  60%{ transform: translateX(-1%); }
  80%{ transform: translateX(1%); }
}

/* Button */
.fvc_btn{
  font-size: 1.2rem;
  font-family: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
  display: inline-block;
  background: #d60a1a; /* red */
  color: #fff;
  border: 0;
  border-radius: 1.2rem;  
  padding: 1rem;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease;
  width: 6rem;
  font-weight: 600;
  text-align: center;
  margin-left: 1.5rem;
}
.fvc_btn:hover{ background: #b90916; font-weight: 400; } /* slightly darker on hover */
.fvc_btn:active{ transform: scale(.9); }
.fvc_btn[disabled]{ opacity: .6; cursor: not-allowed; }

.fvc_text_bank{ display:none; }

/* Success panel (revealed after send) */
.fvc_success_panel{
  margin-top: 1rem;
  background: #ffffff;
  border-radius: .3rem;
  padding: 1.2rem;
  box-shadow: 0 0.2rem 0.8rem rgba(0,0,0,.25);
  display: none !important; 
  margin: 0 3rem 0 3rem !important;
}

div.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained div.wp-block-group.fvc_box.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained.is-sent div.wp-block-group.fvc_success_panel.is-layout-flow.wp-block-group-is-layout-flow {
  margin: 0 3rem 0 3rem !important;
} 

/* Shrink effect after success (50% height) */
.fvc_box.is-sent .fvc_form{
  transform: scaleY(.5);
  transform-origin: top;
  transition: transform .4s ease;
}
.fvc_box.is-sent .fvc_form > *:not(.fvc_success_panel){ display:none; } 
.fvc_box.is-sent .fvc_success_panel{ display:block !important; }

.fvc_box .wp-block-group.fvc_success_panel p.fvc_success_text {
  font-family: 'Exo 2', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  padding: 4rem 2rem 4rem 2rem;
}

@media (max-width: 800px){
  h2.wp-block-heading.fvc_title { 
    font-size: 1.0rem !important; 
  }
  
  .fvc_field--company,
  .fvc_field--name,
  .fvc_field--email,
  .fvc_field--phone,
  .fvc_field--message { width: 82%; min-width: 82%; max-width: 82%; }

  .fvc_alert{
    margin: 0.5rem 3rem 0 1.5rem;
  }

  .fvc_fieldwrap .fvc_counter{
    position: static;
    transform: none;
    margin-left: auto;
  }
  .fvc_label{
    justify-content: space-between;
  }
}