html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5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bGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Roman Deed Styling */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&display=swap');

.generator-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
}

.input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 500px;
}

.input-label {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1rem;
    color: #5a3a1a;
    margin-bottom: 0.75rem;
    text-align: center;
}

.name-input {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    padding: 0.75rem 1.25rem;
    width: 100%;
    max-width: 400px;
    border: 2px solid #8b4513;
    border-radius: 4px;
    background: #f4f1e8;
    color: #2c1810;
    text-align: center;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: #5a3a1a;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.3);
}

.name-input::placeholder {
    color: #8b7355;
    font-style: italic;
}

.roman-deed {
    background: linear-gradient(to bottom, #f4f1e8 0%, #e8e3d3 100%);
    border: 8px double #8b4513;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(139, 69, 19, 0.1);
    padding: 3rem 2.5rem;
    max-width: 700px;
    width: 100%;
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
}

.roman-deed::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid #8b4513;
    pointer-events: none;
}

.deed-header {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #5a3a1a;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 2rem;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 0.5rem;
}

.deed-name {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c1810;
    margin: 1.5rem 0;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.deed-title {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #5a3a1a;
    margin: 1rem 0 1.5rem 0;
    font-style: italic;
}

.deed-divider {
    width: 60%;
    height: 2px;
    background: linear-gradient(to right, transparent, #8b4513, transparent);
    margin: 2rem auto;
}

.deed-quote {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #3a2a1a;
    margin: 2rem 0;
    font-style: italic;
    text-align: center;
}

.deed-seal {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #8b4513;
    letter-spacing: 8px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 3px double #8b4513;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    cursor: help;
    position: relative;
}

.deed-seal:hover {
    color: #6b3410;
}

.generate-button {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    background: linear-gradient(to bottom, #8b4513 0%, #6b3410 100%);
    color: #f4f1e8;
    border: 3px solid #5a3a1a;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.generate-button:hover {
    background: linear-gradient(to bottom, #6b3410 0%, #5a3a1a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.generate-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.share-button {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    background: linear-gradient(to bottom, #5a7a8b 0%, #3a5a6b 100%);
    color: #f4f1e8;
    border: 2px solid #2a4a5b;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.share-button:hover {
    background: linear-gradient(to bottom, #3a5a6b 0%, #2a4a5b 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
}

.share-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.copy-message {
    font-family: 'Georgia', serif;
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-link-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    max-width: 600px;
    width: 100%;
}

.share-link-label {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    color: #5a3a1a;
}

.share-link-input {
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    width: 100%;
    border: 2px solid #8b4513;
    border-radius: 4px;
    background: #f4f1e8;
    color: #2c1810;
    text-align: center;
    cursor: text;
}

.share-link-input:focus {
    outline: none;
    border-color: #5a3a1a;
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.3);
}

.copy-link-button {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(to bottom, #5a7a8b 0%, #3a5a6b 100%);
    color: #f4f1e8;
    border: 2px solid #2a4a5b;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 1.2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.copy-link-button:hover {
    background: linear-gradient(to bottom, #3a5a6b 0%, #2a4a5b 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.copy-link-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.error-message {
    font-family: 'Georgia', serif;
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    border-radius: 4px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    max-width: 700px;
    width: 100%;
    text-align: center;
}

/* Responsive Design - Media Queries */

/* Tablet and below (max-width: 1024px) */
@media (max-width: 1024px) {
    .generator-container {
        padding: 1.5rem;
        min-height: 70vh;
    }

    .input-section {
        max-width: 450px;
    }

    .name-input {
        font-size: 1rem;
        padding: 0.7rem 1.1rem;
    }

    .roman-deed {
        padding: 2.5rem 2rem;
        max-width: 600px;
    }

    .deed-name {
        font-size: 2.2rem;
    }

    .deed-title {
        font-size: 1.3rem;
    }

    .deed-quote {
        font-size: 1rem;
        line-height: 1.7;
    }

    .deed-seal {
        font-size: 1.8rem;
        letter-spacing: 6px;
    }

    .generate-button {
        font-size: 1rem;
        padding: 0.9rem 2rem;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .generator-container {
        padding: 1rem;
        min-height: auto;
    }

    .input-section {
        margin-bottom: 1.5rem;
    }

    .input-label {
        font-size: 0.95rem;
    }

    .name-input {
        font-size: 0.95rem;
        padding: 0.65rem 1rem;
        max-width: 100%;
    }

    .roman-deed {
        padding: 2rem 1.5rem;
        border-width: 6px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(139, 69, 19, 0.1);
    }

    .roman-deed::before {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        border-width: 1px;
    }

    .deed-header {
        font-size: 1rem;
        letter-spacing: 2px;
        margin-bottom: 1.5rem;
    }

    .deed-name {
        font-size: 1.8rem;
        margin: 1rem 0;
    }

    .deed-title {
        font-size: 1.1rem;
        margin: 0.8rem 0 1.2rem 0;
    }

    .deed-divider {
        width: 70%;
        margin: 1.5rem auto;
    }

    .deed-quote {
        font-size: 0.95rem;
        line-height: 1.6;
        margin: 1.5rem 0;
    }

    .deed-seal {
        font-size: 1.5rem;
        letter-spacing: 5px;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top-width: 2px;
    }

    .generate-button {
        font-size: 0.95rem;
        padding: 0.8rem 1.8rem;
        letter-spacing: 1.5px;
    }

    .share-button {
        font-size: 0.9rem;
        padding: 0.65rem 1.5rem;
        letter-spacing: 1.2px;
    }

    .copy-message {
        font-size: 0.9rem;
        padding: 0.65rem 1.2rem;
    }

    .share-link-container {
        max-width: 100%;
    }

    .share-link-input {
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem;
    }

    .copy-link-button {
        font-size: 0.85rem;
        padding: 0.55rem 1.3rem;
    }

    .error-message {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .generator-container {
        padding: 0.75rem;
    }

    .roman-deed {
        padding: 1.5rem 1rem;
        border-width: 4px;
    }

    .roman-deed::before {
        top: 8px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .deed-header {
        font-size: 0.9rem;
        letter-spacing: 1.5px;
        margin-bottom: 1rem;
    }

    .deed-name {
        font-size: 1.5rem;
        margin: 0.8rem 0;
        word-wrap: break-word;
    }

    .deed-title {
        font-size: 1rem;
        margin: 0.6rem 0 1rem 0;
    }

    .deed-divider {
        width: 80%;
        margin: 1.2rem auto;
    }

    .deed-quote {
        font-size: 0.9rem;
        line-height: 1.5;
        margin: 1.2rem 0;
    }

    .deed-seal {
        font-size: 1.3rem;
        letter-spacing: 4px;
        margin-top: 1.2rem;
        padding-top: 0.8rem;
    }

    .generate-button {
        font-size: 0.9rem;
        padding: 0.7rem 1.5rem;
        letter-spacing: 1px;
        width: 100%;
        max-width: 300px;
    }

    .error-message {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}
