/**
 * Tip Jar Banner
 *
 * Styles for the donation/support banner shown on dashboard and settings pages.
 *
 * @package AgenticWP
 */

/* Hidden by default, shown via JavaScript after localStorage check */
.agenticwp-tip-jar {
    display: none;
    margin-bottom: var(--agenticwp-space-xl);
}

/* Visible state applied by JavaScript */
.agenticwp-tip-jar.agenticwp-tip-jar--visible {
    display: flex;
    align-items: center;
    gap: var(--agenticwp-space-lg);
    animation: tipJarFadeIn 0.4s ease-out;
}

@keyframes tipJarFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Banner styling */
.agenticwp-tip-jar {
    background: linear-gradient(145deg, #fff, #f0fdf4);
    border: 1px solid #bbf7d0;
    border-radius: var(--agenticwp-radius-lg);
    padding: var(--agenticwp-space-md) var(--agenticwp-space-lg);
    position: relative;
}

/* Icon */
.agenticwp-tip-jar-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.agenticwp-tip-jar-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Content */
.agenticwp-tip-jar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agenticwp-tip-jar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--agenticwp-text-primary);
}

.agenticwp-tip-jar-message {
    font-size: 13px;
    color: var(--agenticwp-text-secondary);
    line-height: 1.4;
}

/* PayPal button container */
.agenticwp-tip-jar-action {
    flex-shrink: 0;
}

.agenticwp-tip-jar-action input[type="image"] {
    height: 32px;
    width: auto;
    transition: transform 0.2s ease;
    vertical-align: middle;
}

.agenticwp-tip-jar-action input[type="image"]:hover {
    transform: scale(1.05);
}

/* Dismiss button */
.agenticwp-tip-jar-dismiss {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--agenticwp-text-tertiary, #9ca3af);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.agenticwp-tip-jar-dismiss:hover,
.agenticwp-tip-jar-dismiss:focus {
    color: var(--agenticwp-text-secondary, #6b7280);
    background: rgba(0, 0, 0, 0.05);
    outline: none;
}

.agenticwp-tip-jar-dismiss .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Responsive: Stack on mobile */
@media screen and (max-width: 600px) {
    .agenticwp-tip-jar.agenticwp-tip-jar--visible {
        flex-wrap: wrap;
        gap: var(--agenticwp-space-md);
    }

    .agenticwp-tip-jar-content {
        flex-basis: calc(100% - 56px);
    }

    .agenticwp-tip-jar-action {
        flex-basis: 100%;
    }

    .agenticwp-tip-jar-dismiss {
        position: absolute;
        top: 8px;
        right: 8px;
    }
}
