/**
 * PMTNM Tips System - Universal tip banners with user controls
 * Provides consistent tip styling across all pages with hide/disable functionality
 */

.tip-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #fff8db 100%);
    border: 2px solid #ffe69c;
    color: #664d03;
    padding: 20px 24px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
    transition: all 0.3s ease;
}

.tip-banner::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fd7e14, #183661);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tip-banner:hover::before {
    opacity: 0.1;
}

.tip-banner h4 {
    margin: 0 0 10px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #183661;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-banner p {
    margin: 0 0 16px 0;
    line-height: 1.6;
    color: #5a4a03;
}

.tip-banner a {
    color: #183661;
    font-weight: 600;
    text-decoration: underline;
}

.tip-banner a:hover {
    color: #1e4070;
}

.tip-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ffe69c;
}

.tip-actions .btn {
    background: #183661;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.tip-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 54, 97, 0.3);
}

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

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

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

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

/* Floating tips toggle button */
.tips-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: linear-gradient(135deg, #fd7e14 0%, #e96b00 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(253, 126, 20, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: tipsPulse 2s infinite;
}

.tips-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(253, 126, 20, 0.5);
    animation: none;
}

@keyframes tipsPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(253, 126, 20, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 10px 30px rgba(253, 126, 20, 0.5);
    }
}

/* 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%);
}