/* Shared notifications, contact modal and form controls */

.notification {
    position: fixed;
    top: -120px;
    right: 20px;
    z-index: 10000;
    width: min(400px, calc(100% - 40px));
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transition: top 300ms ease;
}

.notification.show { top: 96px; }
.notification.success { color: #fff; background: var(--success); border-color: var(--success); }
.notification.error { color: #fff; background: var(--danger); border-color: var(--danger); }
.notification.warning { color: #fff; background: var(--warning); border-color: var(--warning); }

.notification-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notification-message { flex: 1; }

.notification-close {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    color: inherit;
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.75;
}

.notification-close:hover { opacity: 1; }

.modal,
.license-modal,
.service-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 20px;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    background: rgb(18 24 39 / 66%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-content {
    position: relative;
    width: min(100%, 600px);
    margin: 50px auto;
    padding: 0 2.5rem 2.5rem;
    color: var(--ink);
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.modal-content-license,
.modal-content-service {
    position: relative;
    width: min(100%, 600px);
    margin: 50px auto;
    color: var(--ink);
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.modal-header,
.modal-header-service {
    position: relative;
    margin: 0 -2.5rem 1.5rem;
    padding: 1.5rem 4rem 1.5rem 2.5rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--canvas);
}

.modal-header h2,
.modal-header-service h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.45rem;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.close-modal,
.modal-close,
.modal-close-license {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--ease), border-color var(--ease), background var(--ease);
}

.close-modal:hover,
.modal-close:hover,
.modal-close-license:hover {
    color: #fff;
    border-color: var(--ink);
    background: var(--ink);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 0.9rem;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: #fafafd;
    transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.form-group textarea {
    width: 100%;
    min-height: 130px;
    padding: 0.8rem 0.9rem;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: #fafafd;
    resize: vertical;
    transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 0;
    border-color: var(--brand-violet);
    background: #fff;
    box-shadow: 0 0 0 4px rgb(116 91 199 / 11%);
}

.captcha-group {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

.success-message {
    margin-bottom: 1rem;
    padding: 1rem;
    display: none;
    color: var(--success);
    border-left: 4px solid var(--success);
    border-radius: var(--radius-sm);
    background: rgb(8 127 91 / 8%);
}

.error-message {
    margin-top: 0.3rem;
    display: none;
    color: var(--danger);
    font-size: 0.84rem;
}

.submit-button {
    width: 100%;
    margin-top: 0.5rem;
}

.submit-button:disabled {
    color: #707888;
    border-color: #e2e4ea;
    background: #e2e4ea;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .modal { padding: 10px; }
    .modal-content { margin: 20px auto; padding: 0 1.5rem 2rem; }
    .modal-header { margin-inline: -1.5rem; padding-left: 1.5rem; }
    .notification { right: 10px; width: calc(100% - 20px); }
    .notification.show { top: 80px; }
}

@media (max-width: 480px) {
    .modal-content { margin: 10px auto; padding-inline: 1rem; border-radius: 15px; }
    .modal-header { margin-inline: -1rem; padding-left: 1rem; border-radius: 15px 15px 0 0; }
    .g-recaptcha { transform: scale(0.9); transform-origin: center; }
}
