/**
 * PMTNM Tips System - Universal tip banners with user controls
 * Wikipedia-style minimal design with expandable orange ? button
 */

/* Container for toggle button and banner */
.tip-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Hidden by default, shown when expanded */
.tip-banner {
    background: #ffffff;
    border: 1px solid #a7d7f9;
    color: #000000;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    min-width: 300px;
    max-width: 400px;
    z-index: 10000;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tip-banner.expanded {
    display: block;
}

.tip-container .tip-banner {
    position: relative;
    top: auto;
    right: auto;
}

.tip-banner h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #000000;
    font-family: "Linux Libertine", Georgia, Times, serif;
}

.tip-banner p,
.tip-banner div {
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
    color: #000000;
    font-size: 0.875rem;
}

.tip-banner a {
    color: #0645ad;
    text-decoration: underline;
}

.tip-banner a:visited {
    color: #0b0080;
}

.tip-banner a:hover {
    text-decoration: underline;
}

.tip-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #a7d7f9;
}

.tip-actions .btn {
    background: #f8f9fa;
    color: #000000;
    border: 1px solid #a7d7f9;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 400;
    cursor: pointer;
    font-family: inherit;
}

.tip-actions .btn:hover {
    background: #eaf3ff;
}

.tip-actions .btn.secondary {
    background: #f8f9fa;
}

.tip-actions .btn.secondary:hover {
    background: #eaf3ff;
}

.tip-actions .btn.warn {
    background: #f8f9fa;
}

.tip-actions .btn.warn:hover {
    background: #eaf3ff;
}

/* Simple orange ? button in upper right */
.tip-container .tips-toggle {
    background: #ff8c32;
    color: #ffffff;
    border: 1px solid #ff8c32;
    width: 36px;
    height: 36px;
    padding: 0;
    font-weight: 600;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
}

.tip-container .tips-toggle:hover {
    background: #e96b00;
    border-color: #e96b00;
}

@keyframes tipsPulse {
    /* Removed animation for Wikipedia-style simplicity */
}

/* Hide animation */
.tip-banner.hiding {
    opacity: 0;
    transform: translateY(-20px);
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
}

/* Show animation */
.tip-banner.showing {
    animation: tipSlideIn 0.5s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .tip-banner {
        padding: 16px 20px;
        margin: 16px 0;
        border-radius: 10px;
    }
    
    .tip-banner h4 {
        font-size: 1.1rem;
    }
    
    .tip-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .tip-actions .btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .tips-toggle {
        bottom: 16px;
        right: 16px;
        padding: 12px 18px;
        font-size: 0.85rem;
    }
}

/* Success/Error message consistency */
.message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid transparent;
}

.message.success {
    background: linear-gradient(135deg, #d4edda 0%, #e2f4e6 100%);
    border-color: #c3e6c3;
    color: #155724;
}

.message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #fce4e6 100%);
    border-color: #f1aeb5;
    color: #721c24;
}

.message.info {
    background: linear-gradient(135deg, #cce7ff 0%, #e0f3ff 100%);
    border-color: #b8daff;
    color: #004085;
}

.message.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fff8db 100%);
    border-color: #ffe69c;
    color: #664d03;
}

/* Button standardization */
.btn-primary {
    background: linear-gradient(135deg, #183661 0%, #1e4070 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e4070 0%, #244080 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #4e5459 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20963c 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #20963c 0%, #1e7e34 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #fd7e14 0%, #e96b00 100%);
    color: white;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e96b00 0%, #d65a00 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
}