/**
 * @class Ext.form.FieldSet
 */

.x-form-fieldset {
    margin: 1em 1em 1.5em;

    .x-form-fieldset-inner {
        border: $fieldset-border-width solid $fieldset-border-color;
        background: $field-background-color;
        padding: 0;
        @if $include-border-radius {
            @include border-radius($fieldset-border-radius);
        }
    }

    //Ext.field.Field
    .x-field {
        border-bottom: 1px solid $field-border-color;
        background: transparent;

        &:first-child {
            @if $include-border-radius {
              @include border-top-radius($fieldset-border-radius);
            }
        }

        &:last-child {
            border-bottom: 0;

            @if $include-border-radius {
              @include border-bottom-radius($fieldset-border-radius);
            }
        }
    }
}

.x-form-fieldset-title {
    margin: 1em .7em .3em;
    color: $fieldset-title-color;
}

.x-form-fieldset-instructions {
    color: lighten($fieldset-title-color, 30%);
    margin: 1em .7em .3em;
    font-size: .8em;
}

@if $include-border-radius {
    .x-label-align-left {
        &:first-child {
            .x-form-label {
                @include border-top-left-radius($fieldset-border-radius);
            }
        }

        &:last-child {
            .x-form-label {
                @include border-bottom-left-radius($fieldset-border-radius);
            }
        }
    }

    .x-label-align-right {
        &:first-child {
            .x-form-label {
              @include border-top-right-radius($fieldset-border-radius);
            }
        }

        &:last-child {
            border-bottom: 0;

            .x-form-label {
                @include border-bottom-right-radius($fieldset-border-radius);
            }
        }
    }

    .x-label-align-top {
        &:first-child {
            .x-form-label {
                @include border-top-radius($fieldset-border-radius);
            }
        }
    }

    .x-label-align-bottom {
        &:last-child {
            .x-form-label {
                @include border-bottom-radius($fieldset-border-radius);
            }
        }
    }
}