/* 
* Fiscal Manager - Ilmoitustyylit 
*/

/* Ilmoituscontainer */
.fiscal-message {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 2000;
    max-width: 350px;
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease forwards;
    margin-bottom: 10px;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.fiscal-message:hover {
    opacity: 1;
}

/* Ilmoitussisältö */
.fiscal-message-content {
    display: flex;
    align-items: center;
    padding: 5px;
}

.fiscal-message-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.fiscal-message-text {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
}

.fiscal-message-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    margin-left: 10px;
    padding: 0 5px;
}

.fiscal-message-close:hover {
    opacity: 1;
}

/* Ilmoitustyypit */
.fiscal-message-info {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-left: 5px solid var(--color-accent-hover);
}

.fiscal-message-info .fiscal-message-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='16' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'%3E%3C/line%3E%3C/svg%3E");
}

.fiscal-message-success {
    background-color: var(--color-green);
    color: var(--color-white);
    border-left: 5px solid var(--color-green-hover);
}

.fiscal-message-success .fiscal-message-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'%3E%3C/path%3E%3Cpolyline points='22 4 12 14.01 9 11.01'%3E%3C/polyline%3E%3C/svg%3E");
}

.fiscal-message-warning {
    background-color: #ff9800;
    color: #fff;
    border-left: 5px solid #e65100;
}

.fiscal-message-warning .fiscal-message-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'%3E%3C/path%3E%3Cline x1='12' y1='9' x2='12' y2='13'%3E%3C/line%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'%3E%3C/line%3E%3C/svg%3E");
}

.fiscal-message-error {
    background-color: var(--color-red);
    color: var(--color-white);
    border-left: 5px solid var(--color-red-hover);
}

.fiscal-message-error .fiscal-message-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='15' y1='9' x2='9' y2='15'%3E%3C/line%3E%3Cline x1='9' y1='9' x2='15' y2='15'%3E%3C/line%3E%3C/svg%3E");
}

/* Lomakevirheet */
.field-error-message {
    color: var(--color-red);
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.input-validation-error {
    border-color: var(--color-red) !important;
    background-color: rgba(240, 71, 112, 0.1) !important;
}

/* Animaatiot */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 0.9;
    }
}

@keyframes fadeOut {
    from {
        opacity: 0.9;
    }
    to {
        opacity: 0;
    }
}/**
 * FiscalManager - Notification System CSS
 * Styles for the notification and confirmation dialog system
 */

/* Container positioning */
.fiscal-notifications-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
    pointer-events: none; /* Allow clicking through the container */
}

/* Position variations */
.fiscal-position-top-right {
    top: 20px;
    right: 20px;
    width: 350px;
}

.fiscal-position-top-left {
    top: 20px;
    left: 20px;
    width: 350px;
}

.fiscal-position-bottom-right {
    bottom: 20px;
    right: 20px;
    width: 350px;
}

.fiscal-position-bottom-left {
    bottom: 20px;
    left: 20px;
    width: 350px;
}

.fiscal-position-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 450px;
}

.fiscal-position-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 450px;
}

/* Individual notification styling */
.fiscal-notification {
    position: relative;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    pointer-events: auto; /* Make notifications clickable */
    animation: slideIn 0.3s ease-out forwards;
    max-width: 100%;
    background-color: #fff;
    opacity: 0;
    transform: translateY(-10px);
}

.fiscal-notification.closing {
    animation: slideOut 0.3s ease-in forwards;
}

/* Notification content */
.fiscal-notification-content {
    display: flex;
    padding: 16px;
    align-items: flex-start;
}

.fiscal-notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.fiscal-notification-body {
    flex-grow: 1;
    padding-right: 12px;
}

.fiscal-notification-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 16px;
}

.fiscal-notification-message {
    line-height: 1.5;
    color: #505050;
    font-size: 14px;
}

.fiscal-notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s;
    color: #555;
    margin-left: auto;
}

.fiscal-notification-close:hover {
    opacity: 1;
}

/* Progress bar */
.fiscal-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    transition: width linear;
}

/* Notification types */
.fiscal-notification-success {
    border-left: 4px solid #10b981;
}

.fiscal-notification-success .fiscal-notification-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
}

.fiscal-notification-success .fiscal-notification-progress {
    background-color: #10b981;
}

.fiscal-notification-error {
    border-left: 4px solid #ef4444;
}

.fiscal-notification-error .fiscal-notification-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

.fiscal-notification-error .fiscal-notification-progress {
    background-color: #ef4444;
}

.fiscal-notification-warning {
    border-left: 4px solid #f59e0b;
}

.fiscal-notification-warning .fiscal-notification-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
}

.fiscal-notification-warning .fiscal-notification-progress {
    background-color: #f59e0b;
}

.fiscal-notification-info {
    border-left: 4px solid #3b82f6;
}

.fiscal-notification-info .fiscal-notification-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233b82f6'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

.fiscal-notification-info .fiscal-notification-progress {
    background-color: #3b82f6;
}

/* Confirmation dialog */
.fiscal-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fiscal-dialog-overlay.visible {
    opacity: 1;
}

.fiscal-confirmation-dialog {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.fiscal-confirmation-dialog.visible {
    opacity: 1;
    transform: scale(1);
}

.fiscal-confirmation-header {
    padding: 20px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.fiscal-confirmation-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.fiscal-dialog-close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #777;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    margin: 0;
}

.fiscal-dialog-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.fiscal-confirmation-content {
    padding: 20px;
    line-height: 1.5;
}

.fiscal-confirmation-content p {
    margin: 0;
    color: #505050;
}

.fiscal-confirmation-actions {
    padding: 10px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Button styles */
.fiscal-btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-weight: 500;
}

.fiscal-btn:hover {
    transform: translateY(-1px);
}

.fiscal-btn:active {
    transform: translateY(0);
}

.fiscal-btn-cancel {
    background-color: #f1f5f9;
    color: #475569;
}

.fiscal-btn-cancel:hover {
    background-color: #e2e8f0;
}

.fiscal-btn-primary {
    background-color: #3b82f6;
    color: white;
}

.fiscal-btn-primary:hover {
    background-color: #2563eb;
}

.fiscal-btn-danger {
    background-color: #ef4444;
    color: white;
}

.fiscal-btn-danger:hover {
    background-color: #dc2626;
}

.fiscal-btn-success {
    background-color: #10b981;
    color: white;
}

.fiscal-btn-success:hover {
    background-color: #059669;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    /* Make all positions full width on mobile */
    .fiscal-position-top-right,
    .fiscal-position-top-left,
    .fiscal-position-bottom-right,
    .fiscal-position-bottom-left,
    .fiscal-position-top-center,
    .fiscal-position-bottom-center {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        transform: none;
    }
    
    .fiscal-position-top-center,
    .fiscal-position-top-right,
    .fiscal-position-top-left {
        top: 10px;
    }
    
    .fiscal-position-bottom-center,
    .fiscal-position-bottom-right,
    .fiscal-position-bottom-left {
        bottom: 10px;
    }
    
    /* Adjust confirmation dialog on mobile */
    .fiscal-confirmation-dialog {
        width: calc(100% - 20px);
    }
    
    .fiscal-confirmation-actions {
        flex-direction: column-reverse;
    }
    
    .fiscal-btn {
        width: 100%;
        padding: 12px 16px;
    }
}