/* ============================================================
   Alpet — Toastr Teması
   Ortada, %50 genişlik, kapatma butonlu bildirim tasarımı.
   Kullanım: toastr.options.positionClass = "toast-alpet-center";

   Not: Seçicilerde #toast-container kullanılır; toastr'ın kendi
   "#toast-container > div { width:300px; float:left }" kuralını
   ancak aynı özgüllükte bir seçici geçebilir.
   ============================================================ */

#toast-container.toast-alpet-center {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 50rem;
    min-width: 20rem;
    z-index: 9999;
    pointer-events: none;
}

/* --- Gövde --- */
#toast-container.toast-alpet-center > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.875rem;
    row-gap: 0.125rem;
    align-items: start;

    float: none;
    width: 100%;
    max-width: none;
    margin: 0 0 0.75rem;
    padding: 1.125rem 3.25rem 1.125rem 1.25rem;

    background: var(--surface, #fff);
    color: var(--text, #1c2733);
    border: 1px solid var(--border, #dfe4ea);
    border-left: 0.25rem solid var(--toast-accent, #7a8694);
    border-radius: var(--radius, 0.75rem);
    box-shadow: 0 0.75rem 2rem rgba(28, 39, 51, 0.16);

    font-family: var(--font-sans, "Inter", "Segoe UI", sans-serif);
    background-image: none;
    opacity: 1;
    overflow: hidden;
    pointer-events: auto;
    animation: toastAlpetIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#toast-container.toast-alpet-center > div:hover {
    box-shadow: 0 1rem 2.5rem rgba(28, 39, 51, 0.2);
    opacity: 1;
}

@keyframes toastAlpetIn {
    from { opacity: 0; transform: translateY(-0.75rem) scale(0.985); }
    to   { opacity: 1; transform: none; }
}

/* --- İkon --- */
#toast-container.toast-alpet-center > div::before {
    content: "";
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;

    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;

    background-color: var(--toast-tint, #eef1f4);
    background-image: var(--toast-icon, none);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.25rem 1.25rem;
}

/* --- Metin --- */
#toast-container.toast-alpet-center .toast-title {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-family: var(--font-display, "Poppins", sans-serif);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text, #1c2733);
}

#toast-container.toast-alpet-center .toast-message {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-muted, #7a8694);
    word-break: break-word;
}

/* Başlık yoksa mesaj tek satırda dikey ortalansın */
#toast-container.toast-alpet-center .toast-message:first-of-type {
    grid-row: 1 / span 2;
    align-self: center;
}

/* --- Kapatma (çarpı) --- */
#toast-container.toast-alpet-center .toast-close-button {
    position: absolute;
    top: 0.75rem;
    right: 0.875rem;

    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.375rem;
    line-height: 1;
    font-weight: 400;
    color: var(--text-muted, #7a8694);
    text-shadow: none;
    opacity: 1;

    background: transparent;
    border: 0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

#toast-container.toast-alpet-center .toast-close-button:hover,
#toast-container.toast-alpet-center .toast-close-button:focus {
    background: var(--gray-100, #eef1f4);
    color: var(--text, #1c2733);
    opacity: 1;
    outline: none;
}

/* Kapatma butonu mutlak konumlanabilsin */
#toast-container.toast-alpet-center > div {
    position: relative;
}

/* --- İlerleme çubuğu --- */
#toast-container.toast-alpet-center .toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0.1875rem;
    background: var(--toast-accent, #7a8694);
    opacity: 0.4;
}

/* --- Durum renkleri --- */
#toast-container.toast-alpet-center > div.toast-success {
    --toast-accent: var(--alpet-green, #5bbf21);
    --toast-tint: var(--alpet-green-light, #edf8e2);
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235bbf21' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

#toast-container.toast-alpet-center > div.toast-error {
    --toast-accent: #d64545;
    --toast-tint: #fbeaea;
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d64545' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}

#toast-container.toast-alpet-center > div.toast-warning {
    --toast-accent: var(--alpet-orange, #ff8828);
    --toast-tint: var(--alpet-orange-light, #fff1e3);
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff8828' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}

#toast-container.toast-alpet-center > div.toast-info {
    --toast-accent: var(--alpet-blue, #0073c6);
    --toast-tint: var(--alpet-blue-light, #e3f0fb);
    --toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230073c6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 11v5'/%3E%3Cpath d='M12 7.5h.01'/%3E%3C/svg%3E");
}

/* --- Mobil --- */
@media (max-width: 48rem) {
    #toast-container.toast-alpet-center {
        width: calc(100% - 2rem);
        min-width: 0;
        top: 1rem;
    }
}
