/* =========================================================
   ACCESS PAGE SCOPE
   ========================================================= */

body.wcac-access-page .site-content {
    /*align-items: center; */
    justify-content: center;
}

body.wcac-access-page .content-container {
    /* max-width: var(--content-max-width); */
    /*text-align: center; */
}



/* =========================================================
   ACCESS WRAPPER
   ========================================================= */

.wcac-access-wrapper {
    width: 100%;
    margin: 0 auto;
}



/* =========================================================
   TITLES (optional, falls im Content vorhanden)
   ========================================================= */

.access-title {
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.access-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 3.5rem;
}



/* =========================================================
   ACCESS FORM
   ========================================================= */

#wcac-access-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}



/* =========================================================
   CODE INPUT FIELDS
   ========================================================= */

.wcac-access-fields {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    margin-bottom: 3rem;
}

.wcac-access-input {
    width: 60px;
    height: 64px;

    text-align: center;

    border: 1px solid var(--color-primary);
    background: transparent;

    font-family: var(--font-body);
    font-size: 1.6rem;
    color: var(--color-text-muted);

    outline: none;

    position: relative;

    transition:
        border var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast);
	text-transform:uppercase;
}

/* Punkt für kommende Felder */
.wcac-access-input::placeholder {
    color: transparent;
}

.wcac-access-input::after {
    content: '•';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--color-text-muted);
    opacity: 0.6;
    pointer-events: none;
}

/* Aktives Feld */
.wcac-access-input:focus {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

.wcac-access-input:focus::after {
    content: '';
}

/* Gefülltes Feld */
.wcac-access-input.has-value {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.wcac-access-input.has-value::after {
    content: '';
}



/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

.wcac-access-submit {
    display: inline-block;
    padding: 0.9rem 2.8rem;

    border: 1px solid var(--color-primary);
    background: transparent;

    color: var(--color-primary);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        background var(--transition-fast),
        color var(--transition-fast);
}

.wcac-access-submit:hover {
    background: var(--color-primary);
    color: #000;
}

.wcac-access-submit:disabled {
    opacity: 0.4;
    cursor: default;
}



/* =========================================================
   ACCESS MESSAGE (ERROR / INFO)
   ========================================================= */

#wcac-access-message {
    position: fixed;
    top: 2rem;
    right: 2rem;

    background: rgba(0, 0, 0, 0.85);
    border-left: 3px solid var(--color-primary);

    padding: 1rem 1.5rem;
    color: var(--color-text-main);
    font-size: 0.9rem;

    opacity: 0;
    transform: translateY(-10px);

    transition:
        opacity var(--transition-fast),
        transform var(--transition-fast);

    pointer-events: none;
}

#wcac-access-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}



/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}



/* =========================================================
   MOBILE ADJUSTMENTS
   ========================================================= */
@media (min-width: 768px) and (max-width: 1023px) {

    .access-subtitle {
        margin-bottom: var(--space-xl);
    }

    .wcac-access-fields
    {
        margin-bottom: var(--space-lg);
    }

}


@media (min-width: 480px) and (max-width: 767px) {

  .wcac-access-fields {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom:4rem;
  }

  .wcac-access-fields input {
    flex: 0 0 auto;
    height: 42px;
    font-size: 16px;
    text-align: center;
  }



  .access-form .code-length-8 input[type="text"] {
    width: clamp(32px, 6vw, 40px);
  }

  .access-form .code-length-7 input[type="text"] {
    width: clamp(36px, 6.5vw, 46px);
  }

  .access-form .code-length-6 input[type="text"] {
    width: clamp(42px, 7vw, 52px);
  }

  .access-form .code-length-5 input[type="text"] {
    width: clamp(48px, 8vw, 60px);
  }

  .access-form .code-length-4 input[type="text"] {
    width: clamp(54px, 9vw, 68px);
  }
}



@media (max-width: 479px) {
    
    .access-subtitle{
        margin-bottom:2.4rem;
    }

  .wcac-access-fields {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom:1.6rem;
  }

  .wcac-access-fields input {
    flex: 0 0 auto;
    height: 38px;
    font-size: 15px;
    text-align: center;
  }

  .access-form .code-length-8 input[type="text"] {
    width: clamp(27px, 7vw, 32px);
  }

  .access-form .code-length-7 input[type="text"] {
    width: clamp(30px, 8vw, 36px);
  }

  .access-form .code-length-6 input[type="text"] {
    width: clamp(34px, 9vw, 42px);
  }

  .access-form .code-length-5 input[type="text"] {
    width: clamp(40px, 10vw, 48px);
  }

  .access-form .code-length-4 input[type="text"] {
    width: clamp(46px, 11vw, 56px);
  }
}



