﻿/* Dialog Library - CSS Styles */

/* Confirm Dialog Styles */
.confirm-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: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .confirm-dialog.show {
        opacity: 1;
        visibility: visible;
    }

.confirm-dialog-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-dialog.show .confirm-dialog-content {
    transform: scale(1);
}

.confirm-dialog-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    text-align: center;
}

.confirm-dialog-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.5;
}

.confirm-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

    .confirm-btn.cancel {
        background-color: #f3f4f6;
        color: #374151;
    }

        .confirm-btn.cancel:hover {
            background-color: #e5e7eb;
        }

    .confirm-btn.confirm {
        background-color: #dc2626;
        color: white;
    }

        .confirm-btn.confirm:hover {
            background-color: #b91c1c;
        }

    .confirm-btn:active {
        transform: translateY(1px);
    }

/* Error Dialog Styles */
.error-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: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .error-dialog.show {
        opacity: 1;
        visibility: visible;
    }

.error-dialog-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.error-dialog.show .error-dialog-content {
    transform: scale(1);
}

.error-dialog-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 16px;
    text-align: center;
    justify-content: center;
}

    .error-dialog-title svg {
        color: #dc2626;
    }

.error-dialog-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
    text-align: left;
    line-height: 1.5;
}

    .error-dialog-message ul {
        margin: 16px 0;
        padding-left: 20px;
        list-style-type: disc;
    }

    .error-dialog-message li {
        margin-bottom: 8px;
        color: #374151;
        font-weight: 500;
    }

        .error-dialog-message li:last-child {
            margin-bottom: 0;
        }

@media (max-width: 768px) {
    .error-dialog-message ul {
        padding-left: 16px;
        margin: 12px 0;
    }

    .error-dialog-message li {
        margin-bottom: 6px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .error-dialog-message ul {
        padding-left: 12px;
        margin: 8px 0;
    }

    .error-dialog-message li {
        margin-bottom: 4px;
        font-size: 13px;
    }
}

.error-dialog-actions {
    display: flex;
    justify-content: center;
}

.error-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #dc2626;
    color: white;
    min-width: 120px;
}

    .error-btn:hover {
        background-color: #b91c1c;
    }

    .error-btn:active {
        transform: translateY(1px);
    }

/* Success Dialog Styles */
.success-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: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .success-dialog.show {
        opacity: 1;
        visibility: visible;
    }

.success-dialog-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 560px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.success-dialog.show .success-dialog-content {
    transform: scale(1);
}

.success-dialog-icon {
    margin-bottom: 24px;
    animation: successIconBounce 0.6s ease-out;
}

    .success-dialog-icon svg {
        color: #10b981;
        animation: successIconPulse 2s ease-in-out infinite;
    }

.success-dialog-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    animation: successTitleSlide 0.6s ease-out 0.2s both;
}

.success-dialog-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.6;
    animation: successMessageSlide 0.6s ease-out 0.4s both;
}

.success-dialog-details {
    background-color: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    animation: successDetailsSlide 0.6s ease-out 0.6s both;
}

.success-detail-item {
    display: grid;
    grid-template-columns: max-content 1fr;
    align-items: start;
    column-gap: 16px;
    row-gap: 6px;
    margin-bottom: 12px;
}

    .success-detail-item:last-child {
        margin-bottom: 0;
    }

.detail-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.detail-value {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
    animation: successValuePulse 2s ease-in-out infinite;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: right;
}

.success-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    animation: successActionsSlide 0.6s ease-out 0.8s both;
}

.success-btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

    .success-btn.primary {
        background: linear-gradient(135deg, #10b981, #059669);
        color: white;
    }

        .success-btn.primary:hover {
            background: linear-gradient(135deg, #059669, #047857);
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
        }

    .success-btn.secondary {
        background-color: #f3f4f6;
        color: #374151;
    }

        .success-btn.secondary:hover {
            background-color: #e5e7eb;
            transform: translateY(-2px);
        }

    .success-btn:active {
        transform: translateY(0);
    }

/* Success Dialog Animations */
@keyframes successIconBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes successIconPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes successTitleSlide {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes successMessageSlide {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes successDetailsSlide {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes successValuePulse {
    0%, 100% {
        color: #1f2937;
    }

    50% {
        color: #10b981;
    }
}

@keyframes successActionsSlide {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .confirm-dialog-content,
    .error-dialog-content,
    .success-dialog-content {
        padding: 24px;
        margin: 20px;
    }

    .confirm-dialog-title,
    .error-dialog-title {
        font-size: 20px;
    }

    .success-dialog-title {
        font-size: 24px;
    }

    .confirm-dialog-actions,
    .success-dialog-actions {
        flex-direction: column;
        gap: 8px;
    }

    .confirm-btn,
    .error-btn,
    .success-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .confirm-dialog-content,
    .error-dialog-content,
    .success-dialog-content {
        padding: 20px;
        margin: 16px;
    }

    .confirm-dialog-title,
    .error-dialog-title {
        font-size: 18px;
    }

    .success-dialog-title {
        font-size: 20px;
    }

    .success-dialog-icon svg {
        width: 40px;
        height: 40px;
    }

    .success-dialog-details {
        padding: 16px;
    }

    .success-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
