/**
 * IDS Customer Portal Styles
 * Complements Tailwind CSS
 */

/* Base Resets */
.ids-portal-wrapper * {
    box-sizing: border-box;
}

.ids-portal-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animation Utilities */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-slideDown {
    animation: slideDown 0.3s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.3s ease-out;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Card hover effects */
.ids-portal-wrapper .hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ids-portal-wrapper .hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.15);
}

/* Form Focus States */
.ids-portal-wrapper input:focus,
.ids-portal-wrapper select:focus,
.ids-portal-wrapper textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Scrollbar Styling */
.ids-portal-wrapper ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.ids-portal-wrapper ::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.ids-portal-wrapper ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.ids-portal-wrapper ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Menu Animation */
.ids-portal-wrapper aside {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast/Notification Styles */
.ids-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: #0f172a;
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: slideUp 0.3s ease-out;
}

.ids-toast.success {
    background: #059669;
}

.ids-toast.error {
    background: #dc2626;
}

/* Plan Card Selection */
.plan-card {
    transition: all 0.2s ease;
}

.plan-card.selected {
    border-color: #0ea5e9;
    background: #f0f9ff;
    box-shadow: 0 20px 40px -15px rgba(14, 165, 233, 0.2);
    transform: scale(1.02);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Badge Styles */
.ids-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}

.ids-badge-sky {
    background: #e0f2fe;
    color: #0369a1;
}

.ids-badge-green {
    background: #dcfce7;
    color: #166534;
}

.ids-badge-amber {
    background: #fef3c7;
    color: #92400e;
}

.ids-badge-slate {
    background: #f1f5f9;
    color: #475569;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .ids-portal-wrapper main {
        margin-left: 0 !important;
    }
}

@media (max-width: 640px) {
    .ids-portal-wrapper .p-6 {
        padding: 16px;
    }
    
    .ids-portal-wrapper .p-8 {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .ids-portal-wrapper aside,
    .ids-portal-wrapper header,
    .ids-portal-wrapper button {
        display: none !important;
    }
    
    .ids-portal-wrapper main {
        margin-left: 0 !important;
    }
}
