﻿/* ==== NOTIFICATION COMPONENT STYLING ==== */
.scale-notification {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background-color: var(--content-bg);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary-color);
    max-width: 380px;
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 9999;
}

.scale-notification-show {
    transform: translateX(0);
    opacity: 1;
}

.scale-notification i {
    font-size: 1.375rem;
    animation: notification-icon-pop 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes notification-icon-pop {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.scale-notification-content {
    flex-grow: 1;
}

    .scale-notification-content h4 {
        margin: 0 0 0.25rem 0;
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    .scale-notification-content p {
        margin: 0;
        font-size: 0.8125rem;
        color: var(--text-secondary);
        line-height: 1.4;
        opacity: 0.9;
    }

.scale-notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 0.5rem;
    flex-shrink: 0;
}

    .scale-notification-close:hover {
        background-color: rgba(0, 0, 0, 0.05);
        color: var(--text-primary);
        transform: rotate(90deg);
    }

.theme-dark .scale-notification-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* On smaller screens, adjust notification width and position */
@media (max-width: 640px) {
    .scale-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        width: calc(100% - 2rem);
    }
}

/* ==== DIALOG COMPONENT STYLING ==== */
.scale-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(3px);
    padding: 1.5rem;
    box-sizing: border-box;
}

.scale-dialog-show {
    opacity: 1;
    visibility: visible;
}

.scale-dialog-content {
    background-color: var(--content-bg);
    border-radius: 0.875rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    position: relative;
    animation-fill-mode: forwards;
}

.scale-dialog-show .scale-dialog-content {
    transform: translateY(0) scale(1);
    animation: dialog-scale-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dialog-scale-in {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scale-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.02);
}

.theme-dark .scale-dialog-header {
    background-color: rgba(255, 255, 255, 0.02);
}

.scale-dialog-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    padding-left: 12px;
}

    .scale-dialog-header h3::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 16px;
        background-color: var(--primary-color);
        border-radius: 2px;
        transition: height 0.2s ease;
    }

.scale-dialog-content:hover .scale-dialog-header h3::before {
    height: 20px;
}

.scale-dialog-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

    .scale-dialog-close:hover {
        background-color: rgba(0, 0, 0, 0.05);
        color: var(--text-primary);
        transform: rotate(90deg);
    }

.theme-dark .scale-dialog-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.scale-dialog-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.scale-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.125rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.02);
}

.theme-dark .scale-dialog-footer {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Style for dialog buttons */
.scale-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--body-bg);
    color: var(--text-primary);
}

    .scale-button::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 5px;
        height: 5px;
        background: rgba(255, 255, 255, 0.5);
        opacity: 0;
        border-radius: 100%;
        transform: scale(1, 1) translate(-50%);
        transform-origin: 50% 50%;
    }

    .scale-button:active::after {
        animation: ripple 0.6s ease-out;
    }

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }

    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.scale-button:hover {
    background-color: var(--body-bg);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.scale-button:active {
    transform: translateY(0);
}

.scale-button.primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

    .scale-button.primary:hover {
        background-color: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    }

    .scale-button.primary:active {
        transform: translateY(0);
    }

.scale-button i {
    font-size: 0.9375rem;
    transition: transform 0.2s ease;
}

.scale-button:hover i:not(.fa-spin) {
    transform: scale(1.1);
}

/* Handle modal scrolling on smaller screens */
@media (max-height: 700px) {
    .scale-dialog-body {
        max-height: 50vh;
        overflow-y: auto;
    }
}

@media (max-width: 640px) {
    .scale-dialog {
        padding: 1rem;
    }

    .scale-dialog-header {
        padding: 1rem;
    }

    .scale-dialog-body {
        padding: 1rem;
    }

    .scale-dialog-footer {
        padding: 1rem;
    }
}

/* ==== LOADER COMPONENT STYLING ==== */
.scale-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 1.5rem;
    padding: 2rem;
    width: 100%;
    animation: loader-fade-in 0.3s ease forwards;
}

@keyframes loader-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.scale-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(var(--primary-rgb), 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: scale-spin 1s infinite cubic-bezier(0.41, 0.26, 0.54, 0.94);
    position: relative;
}

    .scale-spinner::before,
    .scale-spinner::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        background-color: rgba(var(--primary-rgb), 0.05);
        border-radius: 50%;
    }

    .scale-spinner::before {
        width: 56px;
        height: 56px;
        animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    }

    .scale-spinner::after {
        width: 64px;
        height: 64px;
        animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite 0.3s;
    }

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.6;
    }
}

@keyframes scale-spin {
    to {
        transform: rotate(360deg);
    }
}

.scale-loading p {
    color: var(--text-secondary);
    font-size: 1rem;
    animation: fade-pulse 2s infinite alternate;
    text-align: center;
    max-width: 80%;
    margin: 0;
    font-weight: 500;
}

@keyframes fade-pulse {
    from {
        opacity: 0.7;
    }

    to {
        opacity: 1;
    }
}

/* ==== GLOBAL ANIMATIONS AND EFFECTS ==== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.scale-shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, rgba(var(--primary-rgb), 0.03) 8%, rgba(var(--primary-rgb), 0.07) 18%, rgba(var(--primary-rgb), 0.03) 33% );
    background-size: 1000px 100%;
}

.theme-dark .scale-shimmer {
    background: linear-gradient(to right, rgba(255, 255, 255, 0.03) 8%, rgba(255, 255, 255, 0.07) 18%, rgba(255, 255, 255, 0.03) 33% );
}

/* Responsive adjustments for all components */
@media (max-width: 768px) {
    .scale-notification {
        max-width: calc(100% - 2rem);
    }

    .scale-dialog-content {
        width: 100%;
    }

    .scale-loading {
        min-height: 200px;
    }
}
