/* Admin toast styles are shared across app */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #3498db;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    overflow: hidden;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #2c3e50;
}

.toast-close {
    background: none;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #7f8c8d;
}

/* Типы toast */
.toast-success {
    border-left-color: #27ae60;
}

.toast-success .toast-icon {
    color: #27ae60;
}

.toast-error {
    border-left-color: #e74c3c;
}

.toast-error .toast-icon {
    color: #e74c3c;
}

.toast-warning {
    border-left-color: #f39c12;
}

.toast-warning .toast-icon {
    color: #f39c12;
}

.toast-info {
    border-left-color: #3498db;
}

.toast-info .toast-icon {
    color: #3498db;
}

/* Модальные окна подтверждения */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.confirm-modal-content,
.input-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-modal.show .confirm-modal-content,
.modal.show .input-modal-content {
    transform: scale(1);
}

.confirm-modal .modal-header,
.input-modal .modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.confirm-modal .modal-header h3,
.input-modal .modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.confirm-modal .modal-body,
.input-modal .modal-body {
    padding: 20px 24px;
}

.confirm-modal .modal-body p,
.input-modal .modal-body p {
    margin: 0;
    color: #5a6c7d;
    line-height: 1.5;
    font-size: 15px;
}

.input-modal .modal-body input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.input-modal .modal-body input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.confirm-modal .modal-footer,
.input-modal .modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #e9ecef;
}

.confirm-modal .btn,
.input-modal .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.confirm-modal .btn-secondary,
.input-modal .btn-secondary {
    background: var(--light);
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.confirm-modal .btn-secondary:hover,
.input-modal .btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
}

.confirm-modal .btn-danger,
.input-modal .btn-danger {
    background: #dc3545;
    color: white;
}

.confirm-modal .btn-danger:hover,
.input-modal .btn-danger:hover {
    background: #c82333;
}

/* UI IMPROVEMENT v2: Loading states для кнопок */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

.btn-loading .btn-text {
    opacity: 0;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Спиннер как отдельный элемент (для случаев, когда нужен отдельно) */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

.spinner--small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner--large {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .confirm-modal-content,
    .input-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .confirm-modal .modal-footer,
    .input-modal .modal-footer {
        flex-direction: column;
    }
    
    .confirm-modal .btn,
    .input-modal .btn {
        width: 100%;
    }
}

