
// Include theming for Angular Material with `mat.theme()`.
// This Sass mixin will define CSS variables that are used for styling Angular Material
// components according to the Material 3 design spec.
// Learn more about theming and how to use it for your application's
// custom components at https://material.angular.dev/guide/theming
@use '@angular/material' as mat;

// 导入变量
@use './styles/variables' as *;

// 自定义字体配置
@include mat.core();

html {
  @include mat.theme((
    color: (
      primary: mat.$azure-palette,
      tertiary: mat.$blue-palette,
    ),
    // 不指定typography配置，避免自动加载
    density: 0,
  ));
}

body {
  // Default the application to a light color theme. This can be changed to
  // `dark` to enable the dark color theme, or to `light dark` to defer to the
  // user's system settings.
  color-scheme: light;

  // Set a default background, font and text colors for the application using
  // Angular Material's system-level CSS variables. Learn more about these
  // variables at https://material.angular.dev/guide/system-variables
  background-color: var(--mat-sys-surface);
  color: var(--mat-sys-on-surface);
  font: var(--mat-sys-body-medium);

  // Reset the user agent margin.
  margin: 0;
}
/* 从本地npm包引入Roboto字体，避免网络请求 */
@import 'roboto-fontface/css/roboto/roboto-fontface.css';

/* You can add global styles to this file, and also import other style files */

html, body { height: 100%; }
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }


/* HR Dialog Global Styles - 重新设计解决背景色重合问题 */
.hr-dialog-backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hr-dialog {
  .mat-mdc-dialog-container .mdc-dialog__surface {
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    animation: slideIn 0.3s ease;
  }

  @keyframes slideIn {
    from { 
      opacity: 0;
      transform: translateY(-20px);
    }
    to { 
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mat-mdc-dialog-title {
    margin: 0;
    padding: 24px 32px;
    color: #ffffff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 22px;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
  }

  .mat-mdc-dialog-content {
    padding: 24px 32px;
    background: #ffffff;
    max-height: 70vh;
    overflow-y: auto;
  }

  .mat-mdc-dialog-actions {
    padding: 16px 32px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
  }

  // 表单样式优化
  .employee-form {
    .form-row {
      display: flex;
      gap: 16px;
      margin-bottom: 16px;
      
      mat-form-field {
        flex: 1;
      }
    }

    mat-form-field {
      .mat-mdc-form-field-subscript-wrapper {
        margin-top: 4px;
      }
    }
  }

  // 按钮样式优化
  .mat-mdc-raised-button {
    border-radius: 8px;
    padding: 8px 24px;
    font-weight: 500;
    transition: all 0.3s ease;

    &.mat-primary {
      background: #667eea;
      color: white;
      
      &:hover {
        background: #5a6fd8;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
      }
    }

    &:not(.mat-primary) {
      background: #f1f5f9;
      color: #64748b;
      
      &:hover {
        background: #e2e8f0;
      }
    }
  }
}
