/*
[data-tab="1"] {
    display: none !important;
}
[data-tab="9"] {
    display: block !important;
}
*/

/* ------------------------------------ */
/* Layout                               */
/* ------------------------------------ */

@media (min-width: 768px) {

    .json-field > div > label,
    .json-field .rjf-form-group-children .rjf-form-group-children .rjf-form-group-children label {
        display: none;
    }
    
    .rjf-form-group,
    .rjf-form-group-inner,
    .rjf-form-row-inner {
        padding: 0 !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .rjf-form-row-controls button {
        padding: 6px !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .rjf-form-group,
    .rjf-form-group-wrapper {
        width: fit-content !important;
        max-width: 100% !important;
    }
    
    .json-field fieldset > div > div > div > div {
        margin-bottom: 20px !important;
    }
    
    .json-field .rjf-form-group-children .rjf-form-group-children .rjf-form-group-wrapper {
        
    }
    .json-field .rjf-form-group-children .rjf-form-group-children .rjf-form-group-children {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }
    
    .rjf-form-row label + .rjf-input-group, .rjf-oneof-selector label + .rjf-input-group > .rjf-oneof-selector-input {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    
    .rjf-form-row-controls {
        position: absolute;
        right: none !important;
        left: calc(100% + 20px);
        top: 6px !important;
        width: 70px;
    }

}

/* ------------------------------------ */
/* Title                                */
/* ------------------------------------ */

.rjf-form-group-title {
    display: none !important;
}

.json-field label.inline-group-title {
    width: 100%;
    margin-bottom: 8px;
}
.json-field .inline-group table {
    margin-bottom: 4px;
}

/* ------------------------------------ */
/* Style                                */
/* ------------------------------------ */

.rjf-form-row-controls:hover + .rjf-form-row-inner, .rjf-form-row-controls:hover + .rjf-form-group {
	background-color: transparent !important;
}

.rjf-add-button {
    margin-top: 4px !important;
}
.rjf-add-button:hover {
	background-color: transparent !important;
}

/* ------------------------------------ */
/* Checkbox                             */
/* ------------------------------------ */

.rjf-check-input {
    display: flex;
    flex-direction: row;
}
.rjf-check-input .rjf-radio-option {
	white-space: nowrap;
}
.rjf-check-input .rjf-radio-option input {
    width: auto !important;
}
.rjf-check-input label.rjf-radio-option {
    display: inline-block !important;
    font-weight: normal;
    padding: 0;
}
.rjf-check-input .rjf-radio-option > input {
    position: relative;
    top: -2px;
}

/* ------------------------------------ */
/* Fields                               */
/* ------------------------------------ */

@media (min-width: 768px) {

    .rjf-form-row input, .rjf-form-row select {
        width: 130px !important;
    }
    
    .rjf-form-row input[name*=name] {
        width: 300px !important;
    }
    .rjf-form-row input[name*=zip_code] {
        width: 60px !important;
    }
    .rjf-form-row input[name*=city] {
        width: 180px !important;
    }
    .rjf-form-row input[name*=street] {
        width: 180px !important;
    }
    
    .json-field .inline-group th {
        width: 135px;
        white-space: nowrap;
    }
    .json-field .inline-group th.name {
        width: 285px !important;
    }
    .json-field .inline-group th.zip_code {
        width: 65px !important;
    }
    .json-field .inline-group th.city {
        width: 185px !important;
    }
    .json-field .inline-group th.street {
        width: 185px !important;
    }
    
    .vertretung {
        width: 464px !important;
    }

}

/* ------------------------------------ */
/* Personen                             */
/* ------------------------------------ */

#id_GmbhPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) .rjf-add-button,
#id_GmbhPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) .rjf-form-row-controls,
#id_KgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) .rjf-add-button,
#id_KgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) .rjf-form-row-controls,
#id_OgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) .rjf-add-button,
#id_OgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) .rjf-form-row-controls,
#id_EuPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) .rjf-add-button,
#id_EuPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) .rjf-form-row-controls {
    display: none;
}

#id_GmbhPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) [name*=name],
#id_GmbhPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) [name*=date_birth],
#id_KgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) [name*=name],
#id_KgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) [name*=date_birth],
#id_OgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) [name*=name],
#id_OgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) [name*=date_birth],
#id_EuPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) [name*=name],
#id_EuPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) [name*=date_birth] {
    cursor: default;
    pointer-events: none;
    border-color: #fff;
}
#id_GmbhPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) [name*=date_birth],
#id_KgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) [name*=date_birth],
#id_OgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) [name*=date_birth],
#id_EuPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) [name*=date_birth] {
    margin-left: -8px;
    margin-right: -50px;
    width: 188px !important;
}

/* ------------------------------------ */
/* Readonly                             */
/* ------------------------------------ */

.readonly .json-field input {
    pointer-events: none !important;
    cursor: default;
    border-color: #fff;
}
.readonly .json-field input[type=date] {
    margin-left: -8px;
    margin-right: -50px;
    width: 188px !important;
}



@media (max-width: 768px) {
    
    .readonly .json-field .rjf-form-row-inner input {
        padding: 0 0 0 0px !important;
        height: 18px !important;
        min-height: 18px !important;
    }
    .readonly .json-field .rjf-form-row-inner input[type=date] {
        position: relative;
        top: -4px;
        left: -2px;
    }
    
    .readonly .json-field fieldset .rjf-check-input label.rjf-radio-option {
        margin-left: 0px;
    }
    
    #id_GmbhPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) .rjf-input-group:has(input[type=date]):after,
    #id_KgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(4) .rjf-input-group:has(input[type=date]):after,
    #id_OgPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) .rjf-input-group:has(input[type=date]):after,
    #id_EuPersonen_jsonform fieldset > div > div > .rjf-form-group-children > div:nth-child(3) .rjf-input-group:has(input[type=date]):after,
    .readonly .json-field .rjf-input-group:has(input[type=date]):after {
        content: '';
        display: inline-block;
        width: 32px;
        height: 18px;
        position: relative;
        right: -16px;
        top: 2px;
        background-color: #fff;
    }
    
}

/* ------------------------------------ */
/* Mobile                               */
/* ------------------------------------ */

@media (max-width: 768px) {
    
    .json-field .my-header.inline-group,
    .json-field > div > label {
        display: none;
    }
    
    .json-field .my-header.inline-group-title,
    .json-field .my-header.inline-group-title:after {
        max-height: 36px !important;
    }
    
    .rjf-form-group,
    .rjf-form-group-inner,
    .rjf-form-row-inner {
        padding: 0 !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .json-field input[type=date] {
        margin-left: 0px !important; 
    }
    
    .json-field fieldset .rjf-form-group label,
    .json-field fieldset .rjf-form-group input {
        width: calc(100vw - 60px) !important;
    }
    .json-field fieldset .rjf-check-input {
        flex-direction: column;
    }
    
}

