/* 
 * CSS to transform Gravity Forms Radio Buttons into Tabs
 * Add the class "radio-tabs" to the field in the Gravity Forms backend
 */

/* Previous adjustments */
.gf_skip_hires_wrapper .radio-tabs {
    position: relative !important;
    top: 30px !important;
}

.gf_postcode .button {
    margin-top: 0px !important;
    top: 0px;
    left: -62px;
    width: 100px !important;
    padding: 0.6rem !important;
    background: #7A9F42 !important;
}

/* Hide the "Choose one of:" label */
.radio-tabs .gfield_label {
    display: none;
}

/* Radio buttons container */
.radio-tabs .gchoice {
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    /*width: 32%;*/
}

/* General container to align options */
.radio-tabs .gfield_radio {
    display: grid !important;
    gap: 0;
    list-style: none;
    padding: 4px !important;
    margin: 0;
    border-radius: 60px !important;
    overflow: hidden;
    background-color: #6fa12e;
    /*width: 100%;*/
    grid-auto-flow: column;
    grid-template-columns: repeat(3, 1fr);
}

/* Hide native radio input */
.radio-tabs input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Base style for labels */
.radio-tabs label {
    width: 100%;
    text-align: center;
    padding: 10px 30px !important;
    font-family:Lato;
	font-weight:bold;
    font-size: 16px;
    color: #ffffff;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 46px;
    margin: 0;
    white-space: nowrap;
    border: none;
    max-width: none !important;
}

/* Hover state */
.radio-tabs label:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Selected state */
.radio-tabs input[type="radio"]:checked + label {
    background-color: #ffffff;
    color: #333333;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Remove validation error styling that may interfere */
.radio-tabs.gfield_error {
    background-color: transparent !important;
    border: none !important;
}

.radio-tabs.gfield_error .gfield_radio {
    border: none !important;
}

/* Adjust the spacing of the complete field if needed */
.radio-tabs.gfield {
    margin-bottom: 20px;
}

/* Responsive - for mobile devices */
@media (max-width: 768px) {
    .radio-tabs {
        display: block !important;
        margin-bottom: 20px !important;
    }
    
    .radio-tabs .gfield_radio {
        border-radius: 16px;
    }
    
    .radio-tabs label {
        border-radius: 28px;
        padding: 12px 20px;
        margin: 2px 0;
    }
    
    .radio-tabs .gfield_radio .gchoice {
        /*width: 32.2%;*/
        display: flex !important;
    }
    
    .radio-tabs .gform-field-label {
        max-width: 100% !important;
        padding: 10px !important;
        width: 100%;
    }
    
    .gf_postcode .button {
		margin-top: 0px !important;
		top: 0px;
		left: -0px;
		width: auto !important;
		padding: 0.6rem !important;
		height: 45px !important;
	}
}