/**
 * Material Design Button Styles
 * Based on Material Design 2 specifications
 */

/* Material Design Contained Button (Primary) */
.md-button {
  position: relative;
  display: inline-block;
  padding: 0 24px;
  height: 36px;
  line-height: 36px;
  font-family: 'Tabular', monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  text-decoration: none;
  color: #FFFFFF;
  background-color: #000000;
  border: none;
  border-radius: 4px;
  box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 
              0px 2px 2px 0px rgba(0, 0, 0, 0.14), 
              0px 1px 5px 0px rgba(0, 0, 0, 0.12);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
  vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
  margin: 8px;
}

/* Hover state */
.md-button:hover {
  background-color: #1a1a1a;
  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 
              0px 4px 5px 0px rgba(0, 0, 0, 0.14), 
              0px 1px 10px 0px rgba(0, 0, 0, 0.12);
  color: #FFFFFF;
  text-decoration: none;
}

/* Focus state */
.md-button:focus {
  outline: none;
  background-color: #2d2d2d;
  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 
              0px 4px 5px 0px rgba(0, 0, 0, 0.14), 
              0px 1px 10px 0px rgba(0, 0, 0, 0.12);
}

/* Active/pressed state */
.md-button:active {
  box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 
              0px 8px 10px 1px rgba(0, 0, 0, 0.14), 
              0px 3px 14px 2px rgba(0, 0, 0, 0.12);
  transform: translateY(1px);
}

/* Material Design Outlined Button (Secondary) */
.md-button-outlined {
  position: relative;
  display: inline-block;
  padding: 0 24px;
  height: 36px;
  line-height: 34px; /* Adjusted for border */
  font-family: 'Tabular', monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.25px;
  text-transform: uppercase;
  text-decoration: none;
  color: #000000;
  background-color: transparent;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  box-shadow: none;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
              color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  cursor: pointer;
  vertical-align: middle;
  -webkit-tap-highlight-color: transparent;
  margin: 8px;
}

/* Outlined button hover state */
.md-button-outlined:hover {
  background-color: rgba(0, 0, 0, 0.08);
  border-color: #000000;
  color: #000000;
  text-decoration: none;
}

/* Outlined button focus state */
.md-button-outlined:focus {
  outline: none;
  background-color: rgba(0, 0, 0, 0.12);
  border-color: #000000;
}

/* Outlined button active state */
.md-button-outlined:active {
  background-color: rgba(0, 0, 0, 0.16);
}

/* Ripple effect container */
.md-button::before,
.md-button-outlined::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.md-button:active::before {
  width: 300px;
  height: 300px;
}

.md-button-outlined:active::before {
  background: rgba(0, 0, 0, 0.2);
  width: 300px;
  height: 300px;
}

/* Button group for Material Design buttons */
.md-button-group {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 16px 0;
}

/* Responsive adjustments */
@media (max-width: 575px) {
  .md-button,
  .md-button-outlined {
    padding: 0 16px;
    font-size: 13px;
    height: 32px;
    line-height: 32px;
  }
  
  .md-button-outlined {
    line-height: 30px; /* Adjusted for border */
  }
  
  .md-button-group {
    flex-direction: column;
    width: 100%;
  }
  
  .md-button,
  .md-button-outlined {
    width: 100%;
    text-align: center;
  }
}