@font-face {
    font-family: 'Omnes';
    src: url('../fonts/Omnes Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Omnes';
    src: url('../fonts/Omnes Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Omnes';
    src: url('../fonts/Omnes SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Omnes';
    src: url('../fonts/Omnes Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Omnes';
    src: url('../fonts/Omnes Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

:root {
    --primary: #FF560C;
    --secondary: #E04D0B;
    --accent: #ffa100;
    --blue-dark: #061640;
    --blue-light: #F2F5FA;
    --grey: #666666;
    --off-white: #f5f5f5;
    --white: #ffffff;
    --error: #ff3333;

    --bg-gradient: linear-gradient(135deg, var(--white) 0%, var(--blue-light) 100%);
    --card-shadow: 0 20px 40px rgba(6, 22, 64, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Omnes', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--blue-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.container {
    max-width: 500px;
    width: 100%;
    background: var(--blue-light);
    padding: 3.5rem 3rem;
    border-radius: 32px;
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--blue-dark);
}

.logo-placeholder {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary);
    /* Fully orange */
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.logo-highlight {
    color: var(--primary);
}

.subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--blue-dark);
    margin-bottom: 3rem;
    line-height: 1.4;
    padding: 0 1rem;
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
    text-align: left;
}

.input-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--blue-dark);
    margin-bottom: 0.625rem;
}

.input-field {
    width: 100%;
    padding: 1.125rem 1.5rem;
    font-size: 1.0625rem;
    border: 2px solid #E6E9F0;
    border-radius: 16px;
    background: var(--white);
    transition: var(--transition);
    outline: none;
    color: var(--blue-dark);
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 86, 12, 0.1);
}

.input-field::placeholder {
    color: #A0ACC0;
}

.input-field.input-valid {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.input-field.input-invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(255, 51, 51, 0.1);
}

.field-error {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--error);
    min-height: 1.1em;
    /* evita saltos de layout */
    animation: fadeIn 0.2s ease;
}

.submit-btn {
    width: 100%;
    padding: 1.125rem;
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--blue-dark);
    background: var(--blue-light);
    border: 2px solid var(--blue-dark);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(6, 22, 64, 0.05);
}

.submit-btn:hover {
    background: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 22, 64, 0.1);
}

.submit-btn:active {
    transform: translateY(0);
}

.loader {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(6, 22, 64, 0.1);
    border-radius: 50%;
    border-top-color: var(--blue-dark);
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-text {
    transition: opacity 0.3s;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .loader {
    display: block;
}

.result-area {
    margin-top: 2.5rem;
    padding: 2rem;
    border-radius: 24px;
    display: none;
    animation: fadeIn 0.5s ease;
}

.result-area.success {
    display: block;
    background: var(--blue-light);
    border: 2px solid rgba(6, 22, 64, 0.05);
}

.result-area.error {
    display: block;
    background: rgba(255, 51, 51, 0.05);
    border: 2px solid rgba(255, 51, 51, 0.1);
    color: var(--error);
}

.result-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--blue-dark);
    margin-bottom: 0.75rem;
}

.result-code {
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.actions-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.copy-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue-dark);
    background: transparent;
    border: 2px solid var(--blue-dark);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn.btn-success {
    background: var(--blue-dark);
    color: var(--white);
}

.copy-btn:hover:not(.btn-success) {
    background: rgba(6, 22, 64, 0.05);
}

.btn-icon {
    margin-right: 8px;
    vertical-align: middle;
}

.copy-link {
    background: rgba(255, 86, 12, 0.05);
    color: var(--primary);
    border-color: rgba(255, 86, 12, 0.4);
}

.copy-link.btn-success-link {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.copy-link:hover:not(.btn-success-link) {
    background: rgba(255, 86, 12, 0.1);
}

.link-desc {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #6a7489;
    line-height: 1.4;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 2.5rem 1.5rem;
        margin: 1rem;
    }

    .logo-placeholder {
        font-size: 2rem;
    }

    .result-code {
        font-size: 2.25rem;
    }
}

/* Embedded Mode Styles */
body.embedded {
    background: transparent;
    padding: 1rem;
    min-height: auto;
    display: flex;
    justify-content: center;
}

body.embedded .container {
    max-width: 450px;
    /* narrowed from 500px, but not 100% full width to keep it neat */
    margin: 0 auto;
    /* center it */
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(6, 22, 64, 0.05);
    /* add soft shadow back */
    border: 1px solid rgba(6, 22, 64, 0.1);
}

body.embedded .container::before {
    display: block;
    /* Show the top border in embedded mode again */
}

/* We removed the rule that said "display: none;" for logo-placeholder and subtitle
   so that they remain visible in /?embed=true */

body.embedded .submit-btn {
    box-shadow: none;
}