@import url('https://use.typekit.net/yua3rah.css');

@font-face {
  font-family: 'Cera PRO';
  src: url('fonts/CeraPRO-Bold.woff2') format('woff2'),
    url('fonts/CeraPRO-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Cera PRO';
  src: url('fonts/CeraPRO-Medium.woff2') format('woff2'),
    url('fonts/CeraPRO-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Cera PRO';
  src: url('fonts/CeraPRO-Regular.woff2') format('woff2'),
      url('fonts/CeraPRO-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

* {
    font-family: Cera PRO, sans-serif;
    font-feature-settings: "onum";
    font-variant-numeric: oldstyle-nums;
    color: #2f2c27;
}

/* General Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    background-color: #f69784;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
    box-sizing: border-box;
    line-height: 1.2;
}

body:after {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    content: " ";
    background-image: url(img/pattern.png);
    background-size: contain;
    width: 100%;
    opacity: .2;
    background-position-x: 100%;
    background-repeat: no-repeat;
    background-blend-mode: darken;
    background-color: #f69784;
    z-index: -1;
}

h2 {
    font-family: Rufina-Stencil, serif;
    line-height: 1.4;
    font-weight: 700;
}

h2:first-child,
h3:first-child {
    margin-top: 0;
}

a {
    color: #2f2c27;
}

.wrapper {
    width: 100%;
    text-align: center;
}

/* Form Container */
.register {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 560px;
    box-sizing: border-box;
    margin: 0 auto;
    text-align: left;
}

.fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Form Groups and Floating Labels */
.form-group {
    position: relative;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.form-group input[type="checkbox"] {
    margin: 0;
}

.form-group .label {
    position: absolute;
    top: 15px;
    left: 14px;
    color: #2f2c27;
    background-color: #fff;
    padding: 0 4px;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    text-transform: uppercase;
}

/* Floating label effect */
.form-group input:focus + .label,
.form-group input.active + .label {
    top: -4px;
    font-size: 11px;
    color: #f69784;
}

/* Validation and Error Styling */
.error-field {
    border-color: #dc3545 !important;
}

.error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 4px;
    min-height: 1em; /* Prevent layout shift */
}


/* Select Dropdown */
.select {
    position: relative;
}

/* Radio Buttons */
.radio-title {
    display: block;
    margin-bottom: 0.5rem;
}
.radio {
    display: flex;
    gap: 1rem;
}
.radio-wrap {
    display: flex;
    align-items: center;
}
.radio-label {
    margin-left: 0.5rem;
}

/* Privacy Checkbox */
.privacy label {
    display: flex;
    align-items: start;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.privacy p {
    margin: 0;
}


/* Submit Button and Loading Spinner */
.button-wrapper {
    position: relative;
    margin-top: 1rem;
}

.submit,
.btn {
    width: 100%;
    padding: 12px 30px;
    color: white;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    background-color: #2f2c27;
    font-weight: 700;
    font-family: Cera PRO, sans-serif;
    text-transform: uppercase;
    font-size: .875rem;
    letter-spacing: .05em;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    text-decoration: none;
}

.submit span {
    color: #fff;
}

.submit:disabled {
    background-color: #a0cfff;
    cursor: not-allowed;
}

.submit:not(:disabled):hover,
.btn:hover {
    background-color: #525657;
}

.privacy {
    margin-top: 12px;
}

.loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.animation {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

.logo {
    width: 220px;
    height: 66px;
    margin: 0 auto 40px auto;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Thank You Message */
#register-confirm {
    text-align: center;
    color: #333;
}
