/**
 * Open House Notifier Styles
 * ERA-branded toast notifications
 *
 * @category  Mgwalk
 * @package   Mgwalk_OpenHouseImporter
 */

/* Toast Container */
.era-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 420px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.era-toast-container.era-toast-visible {
    opacity: 1;
    visibility: visible;
}

/* Toast */
.era-toast {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-left: 4px solid #001f3f;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

/* Toast Color Variants */
.era-toast-future {
    border-left-color: #001f3f;
}

.era-toast-today {
    border-left-color: #ff9800;
}

.era-toast-live {
    border-left-color: #4caf50;
}

/* Toast Header */
.era-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #001f3f;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.era-toast-future .era-toast-header {
    background-color: #001f3f;
}

.era-toast-today .era-toast-header {
    background-color: #ff9800;
}

.era-toast-live .era-toast-header {
    background-color: #4caf50;
}

.era-toast-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.era-toast-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.era-toast-close:hover {
    opacity: 1;
}

/* Toast Body */
.era-toast-body {
    padding: 16px;
    color: #333333;
}

.era-toast-context-message {
    font-size: 14px;
    color: #666666;
    font-weight: 500;
    margin-bottom: 16px;
    padding: 10px 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #001f3f;
}

.era-toast-today .era-toast-context-message {
    border-left-color: #ff9800;
    background-color: #fff8f0;
}

.era-toast-live .era-toast-context-message {
    border-left-color: #4caf50;
    background-color: #f1f8f4;
}

.era-toast-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.era-toast-item:last-of-type {
    border-bottom: none;
}

.era-toast-item-image {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
}

.era-toast-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.era-toast-item-content {
    flex: 1;
    min-width: 0;
}

.era-toast-property {
    font-size: 15px;
    font-weight: 600;
    color: #001f3f;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.era-toast-today .era-toast-property {
    color: #ff9800;
}

.era-toast-live .era-toast-property {
    color: #4caf50;
}

.era-toast-location {
    font-size: 13px;
    color: #666666;
    margin-bottom: 4px;
}

.era-toast-datetime {
    font-size: 13px;
    color: #999999;
    font-style: italic;
}

.era-toast-message {
    font-size: 15px;
    color: #333333;
    margin-bottom: 16px;
    line-height: 1.5;
}

.era-toast-more {
    font-size: 13px;
    color: #001f3f;
    font-weight: 500;
    margin-top: 8px;
    text-align: center;
}

.era-toast-today .era-toast-more {
    color: #ff9800;
}

.era-toast-live .era-toast-more {
    color: #4caf50;
}

/* Toast Actions */
.era-toast-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.era-toast-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-block;
}

.era-toast-btn-primary {
    background-color: #001f3f;
    color: #ffffff;
    flex: 1;
}

.era-toast-btn-primary:hover {
    background-color: #001428;
    color: #ffffff;
    text-decoration: none;
}

.era-toast-today .era-toast-btn-primary {
    background-color: #ff9800;
}

.era-toast-today .era-toast-btn-primary:hover {
    background-color: #e68900;
}

.era-toast-live .era-toast-btn-primary {
    background-color: #4caf50;
}

.era-toast-live .era-toast-btn-primary:hover {
    background-color: #43a047;
}

.era-toast-btn-secondary {
    background-color: #f8f9fa;
    color: #333333;
    border: 1px solid #dee2e6;
    flex: 1;
}

.era-toast-btn-secondary:hover {
    background-color: #e9ecef;
}

.era-toast-btn-link {
    background: transparent;
    color: #666666;
    padding: 8px 12px;
    font-size: 13px;
}

.era-toast-btn-link:hover {
    color: #001f3f;
    text-decoration: underline;
}

.era-toast-today .era-toast-btn-link:hover {
    color: #ff9800;
}

.era-toast-live .era-toast-btn-link:hover {
    color: #4caf50;
}

/* Responsive */
@media (max-width: 576px) {
    .era-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .era-toast-actions {
        flex-direction: column;
    }

    .era-toast-btn {
        width: 100%;
    }
}

/* Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.era-toast-visible .era-toast {
    animation: slideInRight 0.3s ease-out;
}
