/* CF7 Premium Multi-Step Addon Frontend Styles */

/* ==========================================================================
   Global Wrapper & Basic Styles
   ========================================================================== */
.cf7pa-wrapper * { box-sizing: border-box; }

.cf7pa-step-content .wpcf7-form-control-wrap {
    position: relative;
    display: block !important;
}
/* Phone field's .iti wrapper needs block layout — flex breaks
   intl-tel-input's absolute positioning and padding calculation */
.cf7pa-step-content .wpcf7-form-control-wrap .iti,
.wpcf7-form-control-wrap .iti {
    display: block;
    width: 100%;
}
/* JS adds this class to .wpcf7-form-control-wrap when it contains a phone field.
   The flex display on the parent wrapper causes intl-tel-input's absolute-
   positioned flag container and dynamic padding-left to break completely,
   resulting in the flag/dial-code overlapping the typed number. */
.cf7pa-has-phone {
    display: block !important;
    width: 100%;
}
.cf7pa-has-phone .iti {
    display: block !important;
    width: 100% !important;
    position: relative !important;
}
.cf7pa-step-content {
    display: none;
}

.cf7pa-step-content .wpcf7-form-control-wrap .wpcf7-not-valid-tip {
    position: absolute;
    top: -17px;
    right: auto;
    padding: 0;
    border-radius: 100px;
    font-size: 12px;
    bottom: auto;
    background: transparent;
    border: navajowhite;
    height: auto;
}
.tvzp-cf7-wrap .wpcf7-list-item {
    flex: min-content;
	
}
.cf7pa-step-content .wpcf7-checkbox,
.cf7pa-step-content .wpcf7-radio{
	column-gap: 20px;
}
.wpcf7-checkbox.list-col-3,
.wpcf7-radio.list-col-3 {
    column-count: 3;  
}
.wpcf7-checkbox.list-col-2,
.wpcf7-radio.list-col-2 {
    column-count: 2; 
}
.wpcf7-list-item {
    display: block;
    break-inside: avoid;
    margin: 0 0 10px;
}
/* Custom Inputs Styling */
.cf7pa-wrapper input[type="text"],
.cf7pa-wrapper input[type="email"],
.cf7pa-wrapper input[type="number"],
.cf7pa-wrapper select,
.cf7pa-wrapper textarea {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    background-color: transparent;
    font-size: 0.95rem;
    color: #334155;
    outline: none;
    transition: border-color 0.3s ease;
    border-radius: 0;
}
.cf7pa-wrapper input:focus, .cf7pa-wrapper select:focus { border-bottom-color: var(--cf7pa-primary, #3b5998); }

/* ==========================================================================
   Intl-Tel-Input Overrides

   intl-tel-input v17 uses absolute positioning for .iti__flag-container
   and dynamically sets padding-left on the <input> via JS to clear the
   flag + dial-code area. We must NOT override that padding-left, or the
   typed number will overlap the flag.

   With separateDialCode: true, the library shows the dial code (+91 etc.)
   as a separate element inside the flag button, keeping it out of the
   input's text value entirely.
   ========================================================================== */
.iti {
    width: 100%;
    display: block;
}
.iti.iti--allow-dropdown,
.iti.iti--separate-dial-code {
    display: block;
}
/* Style the phone input to match our bottom-border design.
   CRITICAL: do NOT set padding-left — the library calculates it. */
.cf7pa-wrapper .iti input[type="tel"],
.iti input[type="tel"].cf7pa-intl-phone,
input[type="tel"].cf7pa-intl-phone {
    width: 100% !important;
    border: none !important;
    border-bottom: 2px solid #cbd5e1 !important;
    background-color: transparent !important;
    font-size: 0.95rem;
    color: #334155;
    outline: none;
    border-radius: 0 !important;
    transition: border-color 0.3s ease;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    padding-right: 0 !important;
    /* Force padding-left so it doesn't overlap if initialized while hidden inside an accordion */
    padding-left: 95px !important;
    height: auto !important;
    box-shadow: none !important;
}
.cf7pa-wrapper .iti input[type="tel"]:focus,
.iti input[type="tel"].cf7pa-intl-phone:focus,
input[type="tel"].cf7pa-intl-phone:focus {
    border-bottom-color: var(--cf7pa-primary, #3b5998) !important;
    box-shadow: none !important;
    outline: none !important;
}
/* Flag dropdown button */
.iti .iti__flag-container {
    bottom: 0;
}
.iti .iti__selected-flag {
    background: transparent !important;
    border: none !important;
    outline: none !important;
}
.iti .iti__selected-flag:hover,
.iti .iti__selected-flag:focus {
    background: rgba(0,0,0,0.03) !important;
}
/* Separated dial code text (+91, +1, etc.) */
.iti--separate-dial-code .iti__selected-dial-code {
    font-size: 0.95rem;
    color: #334155;
    padding-left: 4px;
}
/* Dropdown country list */
.iti__country-list {
    z-index: 9999;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
    margin-top: 4px;
}
.iti__country-list .iti__country {
    padding: 8px 10px;
    font-size: 0.9rem;
}
.iti__country-list .iti__country.iti__highlight {
    background-color: #f0f6ff;
}
/* Arrow icon */
.iti__arrow {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #64748b;
    margin-left: 4px;
}
.iti__arrow--up {
    border-top: none;
    border-bottom: 5px solid #64748b;
}

/* ==========================================================================
   Elementor Editor Preview
   When editing in Elementor, force all accordion steps OPEN so the user
   can see the form fields inside each section during editing.
   ========================================================================== */
body.elementor-editor-active .cf7pa-step-content {
    display: block !important;
}
body.elementor-editor-active .cf7pa-layout-accordion .cf7pa-step-item {
    /* Show as open */
}
body.elementor-editor-active .cf7pa-layout-accordion .cf7pa-step-icon::after {
    transform: rotate(90deg) scale(0);
}
body.elementor-editor-active .cf7pa-layout-tabs .cf7pa-step-item,
body.elementor-editor-active .cf7pa-layout-steps .cf7pa-step-item {
    display: block !important;
}

/* ==========================================================================
   Accordion Layout (cf7pa-layout-accordion)
   ========================================================================== */
/* .cf7pa-layout-accordion .cf7pa-step-item {
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
} */
.cf7pa-layout-accordion .cf7pa-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    background: #fff;
    font-size: 14px;
    border-radius: 12px;
	min-height:60px;
	align-items:center;
}
.cf7pa-step-header .cf7pa-step-title {
    font-size: 18px;
    margin: 0;
    flex: 1;
}
@media(max-width:767px){
.cf7pa-step-header .cf7pa-step-title {
    font-size: 16px;
}
}
.cf7pa-layout-accordion .cf7pa-step-icon {
    width: 24px; height: 24px; border-radius: 50%;
    background-color: var(--cf7pa-primary, #3b5998); position: relative;
    transition: all 0.3s ease;
}
.cf7pa-step-content {
    padding: 0px 20px;
}
.cf7pa-layout-accordion .cf7pa-step-icon::before { content: ''; position: absolute; width: 12px; height: 2px; background: #fff; top: 11px; left: 6px; }
.cf7pa-layout-accordion .cf7pa-step-icon::after { content: ''; position: absolute; width: 2px; height: 12px; background: #fff; top: 6px; left: 11px; transition: transform 0.3s ease; }

.cf7pa-layout-accordion .cf7pa-step-item.active .cf7pa-step-icon { background-color: #f59e0b; }
.cf7pa-layout-accordion .cf7pa-step-item.active .cf7pa-step-icon::after { transform: rotate(90deg) scale(0); }
/* .cf7pa-layout-accordion .cf7pa-step-content { display: none; padding: 0 24px 24px 24px; border-top: 1px solid #e2e8f0; } */

/* ==========================================================================
   Tabs & Steps Layout
   ========================================================================== */
.cf7pa-layout-tabs .cf7pa-step-header,
.cf7pa-layout-steps .cf7pa-step-header { display: none; } /* Hide accordion headers */

.cf7pa-layout-tabs .cf7pa-step-item,
.cf7pa-layout-steps .cf7pa-step-item {
    display: none;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.cf7pa-layout-tabs .cf7pa-step-item.active,
.cf7pa-layout-steps .cf7pa-step-item.active { display: block; }
.cf7pa-layout-tabs .cf7pa-step-content,
.cf7pa-layout-steps .cf7pa-step-content { display: block !important; padding: 0; border: none; }

/* Navigation Top Bar */
.cf7pa-nav-container { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }

/* Tabs Nav */
.cf7pa-nav-container.tabs-nav .cf7pa-nav-item {
    padding: 10px 20px;
    background: #e2e8f0;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}
.cf7pa-nav-container.tabs-nav .cf7pa-nav-item.active { background: var(--cf7pa-primary, #3b5998); color: #fff; }

/* Steps Nav */
.cf7pa-nav-container.steps-nav .cf7pa-nav-item {
    display: flex; flex-direction: column; align-items: center; position: relative; width: 100px;
}
.cf7pa-nav-container.steps-nav .cf7pa-nav-item::after {
    content: ''; position: absolute; top: 15px; right: -60px; width: 40px; height: 2px; background: #cbd5e1;
}
.cf7pa-nav-container.steps-nav .cf7pa-nav-item:last-child::after { display: none; }
.cf7pa-nav-container.steps-nav .cf7pa-step-number {
    width: 32px; height: 32px; border-radius: 50%; background: #e2e8f0; color: #64748b;
    display: flex; align-items: center; justify-content: center; font-weight: bold; margin-bottom: 8px; z-index: 2;
}
.cf7pa-nav-container.steps-nav .cf7pa-nav-item.active .cf7pa-step-number { background: var(--cf7pa-primary, #3b5998); color: #fff; }
.cf7pa-nav-container.steps-nav .cf7pa-nav-item.completed .cf7pa-step-number { background: #10b981; color: #fff; }
.cf7pa-nav-container.steps-nav .cf7pa-step-label { font-size: 0.8rem; text-align: center; color: #64748b; }
.cf7pa-nav-container.steps-nav .cf7pa-nav-item.active .cf7pa-step-label { color: var(--cf7pa-primary, #3b5998); font-weight: bold; }

/* Next/Prev Actions */
.cf7pa-actions { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.cf7pa-btn-next, .cf7pa-btn-prev {
    background: var(--cf7pa-primary, #3b5998); color: #fff; border: none; padding: 10px 24px; border-radius: 6px; cursor: pointer; font-weight: 600;
    transition: opacity 0.2s ease, transform 0.1s ease;
}
.cf7pa-btn-next:hover, .cf7pa-btn-prev:hover { opacity: 0.9; }
.cf7pa-btn-next:active, .cf7pa-btn-prev:active { transform: scale(0.98); }
.cf7pa-btn-prev { background: #94a3b8; }

/* ==========================================================================
   Star Rating field ([cf7_rating]) — pure CSS, no JS required
   ========================================================================== */
.cf7pa-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
}
.cf7pa-rating input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.cf7pa-rating label {
    cursor: pointer;
    font-size: 1.9rem;
    line-height: 1;
    color: #d1d5db;
    transition: color 0.15s ease, transform 0.1s ease;
    margin: 0 !important;
}
.cf7pa-rating input:checked ~ label,
.cf7pa-rating label:hover,
.cf7pa-rating label:hover ~ label {
    color: #f59e0b;
}
.cf7pa-rating label:hover { transform: scale(1.15); }
.cf7pa-rating input:focus-visible + label {
    outline: 2px solid var(--cf7pa-primary, #3b5998);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */
@media (max-width: 640px) {
    .cf7pa-wrapper { padding: 24px 18px; border-radius: 14px; }
    .cf7pa-layout-tabs .cf7pa-step-item,
    .cf7pa-layout-steps .cf7pa-step-item { padding: 20px; }

    .cf7pa-nav-container { gap: 8px; }
    .cf7pa-nav-container.tabs-nav .cf7pa-nav-item { padding: 8px 14px; font-size: 0.85rem; }

    .cf7pa-nav-container.steps-nav { justify-content: space-between; width: 100%; }
    .cf7pa-nav-container.steps-nav .cf7pa-nav-item { width: auto; flex: 1; }
    .cf7pa-nav-container.steps-nav .cf7pa-nav-item::after { right: -50%; width: 100%; }
    .cf7pa-nav-container.steps-nav .cf7pa-step-label { display: none; } /* keep just the numbers on small screens */

    .cf7pa-actions { flex-direction: column-reverse; gap: 10px; }
    .cf7pa-btn-next, .cf7pa-btn-prev { width: 100%; padding: 12px; }

    .cf7pa-rating label { font-size: 1.6rem; }
}
