/* ==========================================================================
   Hypecast Component Styles
   Depends on tokens.css (CSS custom properties must be loaded first)
   All classes use the `hc-` prefix.
   ========================================================================== */

/* ==========================================================================
   Buttons
   ========================================================================== */

.hc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.938rem 1.875rem;
    height: 3.125rem;
    font-family: 'Spartan-Bold';
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--hc-text-light);
    background-image: linear-gradient(45deg, rgba(0, 41, 255, 1) 0%, rgba(0, 209, 255, 1) 100%);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: transform var(--hc-transition-fast), box-shadow var(--hc-transition-fast);
    position: relative;
    z-index: 1;
    white-space: nowrap;
    text-decoration: none;
}

.hc-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(45deg, rgba(0, 209, 255, 1) 0%, rgba(0, 41, 255, 1) 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hc-btn:hover::before {
    opacity: 1;
}

.hc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 41, 255, 0.3);
}

.hc-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 41, 255, 0.2);
}

.hc-btn[disabled],
.hc-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Secondary (Outline) */

.hc-btn--secondary {
    font-family: 'Spartan-Bold';
    color: #090909;
    font-size: 1.125rem;
    line-height: 100%;
    white-space: nowrap;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0.938rem 1.875rem;
    cursor: pointer;
    border: 2px solid #090909;
    box-sizing: border-box;
    border-radius: 4px;
    height: 3.125rem;
    background: white;
    transition: border-color 0.3s ease;
}

.hc-btn--secondary::before {
    display: none;
}

.hc-btn--secondary:hover {
    border-color: #0029FF;
    transform: none;
    box-shadow: none;
}

.hc-btn--secondary:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 41, 255, 0.2);
}

/* Size Modifiers */

.hc-btn--big {
    padding: 18px 40px;
    font-size: 25px;
}

.hc-btn--full {
    width: 100%;
}

/* ==========================================================================
   Inputs
   ========================================================================== */

.hc-input {
    height: auto;
    width: 100%;
    padding: 12px 12px;
    font-size: 1rem;
    font-weight: 400;
    color: #090909;
    background-color: #ffffff;
    border: none;
    border-bottom: 1px solid #090909;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    transition: border-color var(--hc-transition-fast);
}

/* Hide Edge/Chromium native password reveal button (we use our own toggle) */
.hc-input::-ms-reveal,
.hc-input::-ms-clear {
    display: none;
}

.hc-input:focus {
    box-shadow: none;
    border-color: #0029FF;
}

.hc-input--error {
    border-color: var(--hc-error);
}

.hc-input[disabled] {
    background: var(--hc-gray-light);
    border-color: var(--hc-default);
    color: var(--hc-gray-dark);
    cursor: not-allowed;
}

/* ==========================================================================
   Form Field Group
   ========================================================================== */

.hc-field-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    position: relative;
}

.hc-field-group__label,
.hc-label {
    font-family: 'Spartan-Bold';
    font-size: 0.875rem;
    color: inherit;
    margin-bottom: 6px;
}

/* ==========================================================================
   Error Messages
   ========================================================================== */

.hc-error {
    color: var(--hc-error);
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 4px;
    display: block;
    position: relative;
    width: 100%;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.hc-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    border: none;
}

.hc-card--clickable {
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: inherit;
    background: white;
    border-radius: 12px;
    padding: 32px;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.hc-card--clickable:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--hc-blue);
    transform: translateY(-3px);
    text-decoration: none;
}

.hc-card--clickable:focus-visible {
    border-color: var(--hc-blue);
    box-shadow: 0 0 0 3px rgba(0, 41, 255, 0.15);
}

.hc-card--clickable,
.hc-card--clickable:hover,
.hc-card--clickable *,
.hc-card--clickable:hover * {
    text-decoration: none !important;
}

.hc-card--clickable .hc-btn {
    align-self: center;
    width: auto;
    padding: 12px 32px;
}

/* ==========================================================================
   Logo
   ========================================================================== */

.hc-logo {
    height: 35px;
    width: auto;
    margin-bottom: 1.5rem;
    align-self: center;
}

@media (min-width: 768px) {
    .hc-logo {
        height: 50px;
    }
}

/* ==========================================================================
   Subtitle
   ========================================================================== */

.hc-subtitle {
    margin-bottom: 24px;
    text-align: center;
    align-self: center;
    font-size: 0.95rem;
    color: var(--hc-gray-dark);
    line-height: 1.5;
}

/* ==========================================================================
   Form
   ========================================================================== */

.hc-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 400px;
}

.hc-form .hc-btn {
    width: 100%;
}

/* ==========================================================================
   Links
   ========================================================================== */

.hc-link {
    color: #0029FF;
    font-size: 1.125rem;
    font-family: 'Spartan-Bold';
    text-decoration: none;
}

.hc-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Password Wrapper
   ========================================================================== */

.hc-password-wrapper {
    position: relative;
    width: 100%;
}

.hc-password-wrapper .hc-input {
    padding-right: 52px;
}

.hc-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hc-gray-dark);
}

.hc-password-toggle:hover {
    color: var(--hc-text);
}

/* ==========================================================================
   Password Strength Bar
   ========================================================================== */

.hc-strength-bar {
    height: 4px;
    width: 100%;
    background: var(--hc-gray-light);
    border-radius: 2px;
    margin-top: var(--hc-space-sm);
    overflow: hidden;
}

.hc-strength-bar__fill {
    height: 100%;
    border-radius: 2px;
    transition: width var(--hc-transition-base), background-color var(--hc-transition-base);
}

.hc-strength-bar__fill--weak {
    width: 25%;
    background-color: var(--hc-error);
}

.hc-strength-bar__fill--fair {
    width: 50%;
    background-color: var(--hc-warning);
}

.hc-strength-bar__fill--good {
    width: 75%;
    background-color: #8BA500;
}

.hc-strength-bar__fill--strong {
    width: 100%;
    background-color: var(--hc-success);
}

/* ==========================================================================
   Password Requirements Checklist
   ========================================================================== */

.hc-requirements {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--hc-text-secondary);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

.hc-requirements__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.hc-requirements__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #C4C4C4;
    flex-shrink: 0;
    font-size: 0;
    transition: border-color 0.2s, background-color 0.2s;
}

.hc-requirements__item--met .hc-requirements__icon {
    border-color: var(--hc-success);
    background-color: var(--hc-success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.hc-requirements__item--met {
    color: var(--hc-text-secondary);
}

.hc-requirements__item--unmet {
    color: var(--hc-text-secondary);
}

/* ==========================================================================
   Confirm Match Indicator
   ========================================================================== */

.hc-match {
    font-size: 13px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hc-match--yes {
    color: var(--hc-success);
}

.hc-match--no {
    color: var(--hc-error);
}

/* ==========================================================================
   Step Indicator (two-step login)
   ========================================================================== */

.hc-step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    align-self: center;
}

.hc-step-indicator__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hc-default);
    transition: background var(--hc-transition-fast);
}

.hc-step-indicator__dot--active {
    background: var(--hc-blue);
}

.hc-step-indicator__line {
    width: 30px;
    height: 2px;
    background: var(--hc-default);
}

/* ==========================================================================
   Back Button
   ========================================================================== */

.hc-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--hc-text);
    border-radius: var(--hc-radius-sm);
    text-decoration: none;
}

.hc-back-btn:hover {
    color: var(--hc-blue);
    background: rgba(0, 41, 255, 0.05);
}

/* ==========================================================================
   Spinner (CSS-only)
   ========================================================================== */

.hc-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--hc-white);
    border-radius: 50%;
    animation: hc-spin 0.6s linear infinite;
}

@keyframes hc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Alert / Toast
   ========================================================================== */

.hc-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--hc-radius-lg);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: var(--hc-space-md);
}

.hc-alert--success {
    background: rgba(110, 149, 0, 0.1);
    color: var(--hc-success);
    border: 1px solid rgba(110, 149, 0, 0.2);
}

.hc-alert--warning {
    background: rgba(195, 112, 13, 0.1);
    color: var(--hc-warning);
    border: 1px solid rgba(195, 112, 13, 0.2);
}

.hc-alert--error {
    background: rgba(155, 14, 14, 0.1);
    color: var(--hc-error);
    border: 1px solid rgba(155, 14, 14, 0.2);
}

.hc-alert--info {
    background: rgba(0, 41, 255, 0.05);
    color: var(--hc-blue);
    border: 1px solid rgba(0, 41, 255, 0.1);
}

/* ==========================================================================
   SSO Badge
   ========================================================================== */

.hc-badge--sso {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--hc-cyan);
    border: 1px solid var(--hc-cyan);
    border-radius: 999px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
   Divider
   ========================================================================== */

.hc-divider {
    height: 1px;
    background: var(--hc-border);
    margin: var(--hc-space-xl) 0;
    border: none;
}

.hc-divider--blue {
    background: var(--hc-blue);
}

.hc-divider--turquoise {
    background: var(--hc-turquoise);
}

/* ==========================================================================
   Confirmation Icons (success / error / warning / email pages)
   ========================================================================== */

.hc-icon-success {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(110, 149, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--hc-space-xl);
}

.hc-icon-warning {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(195, 112, 13, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--hc-space-xl);
}

.hc-icon-error {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(155, 14, 14, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--hc-space-xl);
}

.hc-icon-email {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 41, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--hc-space-xl);
}
