/*
 * Copyright (c) 2016-2025 Broadcom. All Rights Reserved.
 * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
 * This software is released under MIT license.
 * The full license information can be found in LICENSE in the root directory of this project.
 */

/*
 * These styles are not documented and are deprecated in favor in of _file-input.clarity.scss.
 * The file input component uses .clr-file-input-wrapper instead due to differences from these styles.
 */

@use '../../utils/mixins';
@use '../../utils/variables/variables.global';
@use 'mixins.forms' as forms-mixins;
@use 'variables.forms' as forms-variables;

@include mixins.exports('forms.file') {
  .clr-file-wrapper {
    @include forms-mixins.form-flatten-validate-text();
    position: relative;

    .clr-control-label {
      padding: 0;
    }

    .btn {
      margin: 0;
    }
  }

  .clr-file {
    @include mixins.equilateral(0);
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
  }

  .clr-form-compact .clr-file-wrapper {
    @include forms-mixins.form-flatten-compact-adjustments();
    margin-top: 0;

    & ~ .clr-subtext,
    .clr-control-label {
      margin-top: 0;
    }
  }
}
