/* ===========================
   Global Styles
=========================== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

html, body {
    font-size: 14px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f8f8f8;
}

main {
    margin-top: 50px;
}

#title {
    font-weight: 800;
    font-size: 3rem;
    margin: 4px 0 10px;
    color: #444;
}

a {
    color: #346297;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Focus outlines for accessibility */
.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;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* Header Section */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#aboutImage {
    width: 100%;
    height: 100%;
}

#msdLogo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
}

/* Input fields */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="password"],
select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

input:focus,
select:focus {
    outline: 3px solid #4d90fe;
    outline-offset: 2px;
    border-color: #0066cc;
}

input[data-valid="true"] {
    border: 2px solid #2e7d32;
    outline: none;
}

input[data-valid="true"]:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

input[aria-invalid="true"] {
    border-color: #d93025;
}

input[aria-invalid="true"]:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.2);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 80px;
    right: calc(clamp(420px, 30vw, 570px) + 20px);
    background: #4caf50;
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

.toast-notification.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.toast-notification svg {
    flex-shrink: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Responsive toast positioning */
@media (max-width: 768px) {
    main {
        margin-top: 0;
    }
    .toast-notification {
        top: 70px;
        right: 20px;
        left: 20px;
        max-width: calc(100% - 40px);
    }
}