/* General Form Styles */
.tiber-form {
    width: 100%;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-right: .5rem;
}

/* Grid Layout for Lead Form (Two Columns) */
.lead-form {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
}

.lead-form > .tiber-form-element:not(secton > .tiber-form-element) {
    flex: 0 0 50%;
    padding: 0.25em 1rem;
}

.grid-line-full,
.action-container,
.button-container {
    flex: 0 0 100% !important;
}

label {
    display: block;
    font-size: 16px;
}

/* Dynamic column spans */
.lead-form .span-1 { grid-column: span 1; }
.lead-form .span-2 { grid-column: span 2; }
.lead-form .span-3 { grid-column: span 3; } /* Ensures elements don’t break layout */
.lead-form .span-4 { grid-column: span 4; }
.lead-form .span-5 { grid-column: span 5; }
.lead-form .span-6 { grid-column: span 6; }

.lead-form .sms-consent-container .check-element>div {
	justify-content: start;
	
}

.lead-form .sms-consent-container .check-element>div:last-child {
	font-weight: normal;
    text-align: justify;
}

/* Input Fields */
span.e-ddl.e-input-group.e-control-wrapper.e-ddl, input[type=text], input[type=text]:focus, input[type=text]:active {
    border: 4px solid lightgrey;
    border-radius: 100px;
    height: 3rem;
    line-height: 2.5rem;
    outline: none;
    width: 100%;
    padding-left: 10px;
    font-family: "arial";
    font-size: 18px;
}

.e-ddl.e-input-group .e-input-value
{
    transform: translateY(.2rem);
}


/* Select Fields */
select {
    border: 4px solid lightgrey;
    cursor: pointer;
    height: 3rem;
    outline: none;
    width: 100%;
    padding-left: 10px;
    border-radius: 100px;
	font-size: 18px;
}

/* Form Elements */
.tiber-form-element {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    padding: .1em;
	width: 100% !important;
}

/* Error Messages */
.tiber-form-error {
    color: red;
    font-size: 14px;
    font-variant: small-caps;
    font-weight: 600;
    left: 1.5rem;
    letter-spacing: .4px;
    position: absolute;
    bottom: -10px;
    overflow: hidden;
	white-space: nowrap;
}

.tiber-section-css {
	display: flex;
}

/* Lead Form Overlay */
.lead-form-overlay {
    position: fixed;
    width: 50%;
    background-color: #f5f8f8;
    color: black;
    top: 50%;
	transform: translateY(-50%);
    right: -100vw;
    height: fit-content;
	max-height: 95%;
    overflow: auto;
    overflow-x: hidden;
    z-index: 10000;
    padding: 2.5%;
    transition: right 0.3s ease;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    align-items: center;
    justify-content: flex-start;
    display: flex;
    flex-direction: column;
	border-radius: 7px;
}

/* Ensure Overlay Elements Align */
.lead-form-overlay .lead-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns inside overlay */
}

/* Show Overlay */
.lead-form-overlay.show {
    right: 25%;
	left: 25%;
}


	.lead-form-overlay-close-btn {
		display: none;
	}


/* Side Form Button */
.side-form {
    display: flex;
    position: fixed;
    background-color: #f7951d;
    top: 30%;
    right: 0;
    padding: 10px 20px;
    border-top-left-radius: 50px;
    border-bottom-left-radius: 50px;
    border: none;
    z-index: 3;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out;
}

.side-form:hover {
    padding-right: 25px;
    color: white;
    background-color: #006666;
}

/* Checkbox Customization */
.form-check-input:checked {
    background-color: #006666;
}

.intl-phone-form>section>div.country-picker {
    flex: 0 0 50%;
    max-width: 50%;
}

/*Other Forms*/
.tiber-form-wrapper {
	width: 100% !important;
}

.half-width-form-item {
	width: 50%;
}

.form-section {
	display: flex;
}

section.form-section.journalArticle {
	display: flex;
	flex-direction: column;
}

.journalItem {
	width: 100%;
	
}

.intl-phone-form>section {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

[data-field="journalArticle"],
[data-field="bookChapter"] {
	display: flex;
	flex-direction: column;
}

.mistreatment-form > .tiber-form-element {
	display: flex;
	flex-direction: column;
}

@media (max-width: 1024px) {
	
	.lead-form-overlay {
		width: 70%;
	}
	
	.lead-form-overlay .show {
		right: 15%;
		left: 15%;
	}
}

/* Responsive Grid Adjustments */
@media (max-width: 680px) {
	.lead-form > .tiber-form-element,
	.intl-phone-form>section>div.country-picker {
		flex: 0 0 100% !important;
	}
	.intl-phone-form>section {
		flex-wrap: nowrap;
	}
	
	.intl-phone-form>section>div.country-picker {
		max-width: 100%;
		padding-right: 0;
		
	}
	.intl-phone-form>section>div:not(.country-picker) {
		padding-left: 0;
	}
	
    /* Lead form inside overlay also becomes single-column with a scrollbar */
    .lead-form-overlay .lead-form {
        grid-template-columns: 1fr;
        overflow-y: auto;
        max-height: 80vh; /* Prevents excessive height */
    }

    /* Adjust overlay width */
    .lead-form-overlay {
        width: 80%;
        right: -100vw;
		justify-content: flex-start;
    }

	.lead-form-overlay.show {
   		right: 10%;
    	left: 10%;
	}
	
	#lead-form-title {
		font-size: 30px;
	}
	
	select {
		height: 2rem;	
	}
	
	.country-dd-row>div {
    	line-height: 1.8em;
	}
	
    .e-input-group:not(.e-success):not(.e-warning):not(.e-error):not(.e-float-icon-left), .e-input-group.e-float-icon-left:not(.e-success):not(.e-warning):not(.e-error) .e-input-in-wrap, .e-input-group.e-control-wrapper:not(.e-success):not(.e-warning):not(.e-error):not(.e-float-icon-left), .e-input-group.e-control-wrapper.e-float-icon-left:not(.e-success):not(.e-warning):not(.e-error) .e-input-in-wrap, .e-float-input.e-float-icon-left:not(.e-success):not(.e-warning):not(.e-error) .e-input-in-wrap, .e-float-input.e-control-wrapper.e-float-icon-left:not(.e-success):not(.e-warning):not(.e-error) .e-input-in-wrap {
        border-color: rgba(0, 0, 0, .42);
        width: 100%;
    }
	
	.intl-phone-form>section>div.country-picker {
        max-width: 50%;
        padding-right: 0;
    }
	
	span.e-ddl.e-input-group.e-control-wrapper.e-ddl, input[type=text], input[type=text]:focus, input[type=text]:active {
		height: 2rem;
	}
	
	.e-input-group .e-control-wrapper .country-picker .e-ddl .e-lib .e-keyboard .e-valid-input {
		width: 50%;
	}

	
    /* Reduce padding for better spacing */
    .tiber-form-element {
        padding: 0px;
    }

    .hide680 {
        display: none;
    }
	
	.form-section {
		flex-wrap: wrap;
	}
}

@media (max-width: 480px) {
    .side-form {
        transform: rotate(90deg);
        border-radius: 0 0 5px 5px;
        right: -40px;
    }
	
    /* Adjust overlay width */
    .lead-form-overlay {
        width: 77vw;
        right: -78vw;
		justify-content: flex-start;
    }
	
	.form-section {
		flex-wrap: wrap;
	}
	
	.lead-form-overlay-close-btn {
		display: inherit;
		right: 10px;
		position: absolute;
		top: 6px;
		border: none;
		background-color: transparent;
		font-size: 29px;
	}	
	
    .lead-form-overlay.show {
        right: 0;
        left: 0;
        height: 87vh;
        overflow: scroll !important;
        padding-bottom: 50px;
    }
	
	  .lead-form-overlay {
        width: 100%;
        right: -100%;
        justify-content: flex-start;
    }
}

@media (max-width: 360px) {
    #lead-form {
        padding: 15% 0%;
    }

    #lead-form .col {
        width: 100% !important;
    }
	
	.form-section {
		flex-wrap: wrap;
	}
}
