
.card {
    box-sizing: border-box;
    width: 63.5mm;
    height: 88.9mm;
    background-color: white;
    border-radius: 5mm;
    display: flex;
    flex-direction: column;
    /*justify-content: space-between;*/
    padding: 5mm;
    text-align: center;
    font-family: "Arial", sans-serif;
    /*border: 1mm solid;*/
	  border: solid black 0.05mm;
    position: relative;
    page-break-inside: avoid;
    break-inside: avoid;
}

#card-container .card {
    margin: 0 auto;
}
@media print {
  .card{
border: none;
  }
}

#card-container{
  width: fit-content;
  min-width: min(450px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.link-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  flex: 1 0 0;
  padding: 0.5em 1.2em;
  background: none;
  color: #333;
  text-decoration: none;
  border: 1.5px solid #ccc;
  border-radius: 24px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

@media (max-width: 480px) {
  .link-container {
    flex-direction: column;
  }
  .btn {
    flex: 0 0 auto;
  }
}

.btn:hover {
  border-color: #333;
  color: #000;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

a.btn {
  color: #333 !important;
  text-decoration: none !important;
}

a.btn:hover {
  color: #000 !important;
}

/* Overlay covering the entire screen except the card */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background-color: #4CAF50;*/
    background-color: #f2f2f2;
    opacity: 0;
    visibility: hidden;
    transition: none;
}

/* Ensure the overlay is behind the card */
.overlay.active {
    opacity: 1;
    visibility: visible;
}

.top-left, .bottom-right {
    position: absolute;
    font-size: 5mm;
    font-weight: bold;
}

.top-left {
    top: 3mm;
    left: 5mm;
}

.bottom-right {
    bottom: 3mm;
    right: 5mm;
    transform: rotate(180deg);
}

.suit {
    font-size: 12mm;
    font-weight: bold;
    margin-top: 8mm;
}

.pattern-name {
    font-size: 23px;
    font-weight: bold;
    margin-top: 4mm;
    height: 17mm;
    display: grid;
    place-items: center;
    text-align: center;
}

.pattern-desc {
    font-size: 10px;
    margin-bottom: 7mm;
    padding: 0 4mm;
}

.ui.card{
}

.creational.card{
}
.behavioral.card{
    color: #ffffff;
}

.ai.card{
}

.behavioral.card{
    color: #ffffff;
}
.database.card{
/*background-color: #00ffaa;*/
}


.qr-code {
    padding-top: 8px;
    display: flex;
    justify-content: center;
}
.qr-code img{
    width: 38px;
    height: 38px;
}
