/**
 * Custom Notice Component Styles
 *
 * @package PrepHub
 */

.prephub-notices {
    position: relative;
    z-index: 100;
    padding: var(--spacing-md) 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prephub-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.prephub-notice:last-child {
    margin-bottom: 0;
}

/* Success Notice */
.prephub-notice--success {
    background-color: #F0F9F4;
    border-left: 4px solid #10B981;
    color: #065F46;
}

.prephub-notice--success .prephub-notice__icon {
    color: #10B981;
}

.prephub-notice--success .prephub-notice__content a {
    color: #065F46;
    font-weight: 500;
    text-decoration: underline;
}

.prephub-notice--success .prephub-notice__content a:hover {
    color: #047857;
}

.prephub-notice--success .prephub-notice__content .button,
.prephub-notice--success .prephub-notice__content .wc-forward {
    display: inline-block;
    margin-right: var(--spacing-sm);
    padding: 0.5rem 1.25rem;
    background: var(--color-bright-focus);
    color: var(--color-pure-clarity);
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.prephub-notice--success .prephub-notice__content .button:hover,
.prephub-notice--success .prephub-notice__content .wc-forward:hover {
    background: var(--color-mindflow);
    color: var(--color-pure-clarity);
}

/* Error Notice */
.prephub-notice--error {
    background-color: #FEF2F2;
    border-left: 4px solid #EF4444;
    color: #991B1B;
}

.prephub-notice--error .prephub-notice__icon {
    color: #EF4444;
}

.prephub-notice--error .prephub-notice__content a {
    color: #991B1B;
    font-weight: 500;
    text-decoration: underline;
}

.prephub-notice--error .prephub-notice__content a:hover {
    color: #7F1D1D;
}

/* Info/Notice */
.prephub-notice--notice {
    background-color: #EFF6FF;
    border-left: 4px solid var(--color-bright-focus);
    color: var(--color-deep-knowledge);
}

.prephub-notice--notice .prephub-notice__icon {
    color: var(--color-bright-focus);
}

.prephub-notice--notice .prephub-notice__content a {
    color: var(--color-deep-knowledge);
    font-weight: 500;
    text-decoration: underline;
}

.prephub-notice--notice .prephub-notice__content a:hover {
    color: var(--color-bright-focus);
}

/* Notice Icon */
.prephub-notice__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 2px;
}

.prephub-notice__icon svg {
    width: 24px;
    height: 24px;
}

/* Notice Content */
.prephub-notice__content {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.prephub-notice__content p {
    margin: 0;
}

.prephub-notice__content strong {
    font-weight: 600;
}

.prephub-notice__content ul {
    margin: 0.5rem 0 0;
    padding-left: 1.5rem;
}

.prephub-notice__content li {
    margin-bottom: 0.25rem;
}

/* Close Button */
.prephub-notice__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: currentColor;
    opacity: 0.5;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.prephub-notice__close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

.prephub-notice__close:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.prephub-notice__close svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .prephub-notices {
        padding: var(--spacing-sm) 0;
    }

    .prephub-notice {
        padding: var(--spacing-sm);
        gap: 0.75rem;
    }

    .prephub-notice__content {
        font-size: 0.9375rem;
    }

    .prephub-notice--success .prephub-notice__content .button,
    .prephub-notice--success .prephub-notice__content .wc-forward {
        display: block;
        margin-bottom: var(--spacing-xs);
        text-align: center;
    }
}

/* Animation for closing */
.prephub-notice--closing {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}
