/* ============================================
   IWP Mockup - Component Styles
   Red & White Theme Edition
   ============================================ */

/* Buttons */
.btn-red {
    @apply inline-flex items-center justify-center px-6 py-3 bg-red-600 hover:bg-red-700 text-white font-bold text-sm rounded-xl shadow-md shadow-red-600/20 transition-all duration-200 active:scale-95;
}

.btn-red-outline {
    @apply inline-flex items-center justify-center px-6 py-3 border-2 border-red-600 text-red-600 font-bold text-sm rounded-xl hover:bg-red-600 hover:text-white transition-all duration-200 active:scale-95;
}

.btn-white {
    @apply inline-flex items-center justify-center px-6 py-3 bg-white border border-slate-300 text-slate-700 font-semibold text-sm rounded-xl hover:bg-slate-50 transition-all duration-200 active:scale-95;
}

.btn-sm-red {
    @apply px-4 py-2 bg-red-600 hover:bg-red-700 text-white text-xs font-bold rounded-lg shadow-sm transition-all duration-200 active:scale-95;
}

.btn-sm-white {
    @apply px-4 py-2 bg-white border border-slate-200 text-slate-700 text-xs font-bold rounded-lg hover:bg-slate-100 transition-all duration-200 active:scale-95;
}

/* Cards */
.card-template {
    @apply bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-sm hover:shadow-xl hover:border-red-200 transition-all duration-300 flex flex-col h-full;
}

.card-template-image {
    @apply h-52 bg-slate-100 overflow-hidden relative group;
}

.card-template-body {
    @apply p-6 flex-1 flex flex-col;
}

.card-admin {
    @apply border border-slate-200 rounded-xl p-4 bg-slate-50;
}

.card-stat {
    @apply bg-white p-6 rounded-2xl border border-slate-200 shadow-xs;
}

/* Badges */
.badge-published {
    @apply inline-block mt-2 px-2 py-0.5 bg-emerald-100 text-emerald-800 text-[10px] font-bold rounded-md;
}

.badge-draft {
    @apply inline-block mt-2 px-2 py-0.5 bg-amber-100 text-amber-800 text-[10px] font-bold rounded-md;
}

.badge-active {
    @apply inline-flex items-center px-2.5 py-1 bg-emerald-100 text-emerald-800 text-xs font-bold rounded-full;
}

.badge-active-dot {
    @apply h-1.5 w-1.5 rounded-full bg-emerald-600 mr-1.5;
}

.badge-retrying {
    @apply inline-flex items-center px-2.5 py-1 bg-amber-100 text-amber-800 text-xs font-bold rounded-full;
}

/* Modal */
.modal-overlay {
    @apply fixed inset-0 z-50 flex items-center justify-center bg-slate-900/70 backdrop-blur-sm p-4;
}

.modal-panel {
    @apply bg-white rounded-3xl shadow-2xl overflow-hidden max-h-[90vh] flex flex-col w-full max-w-4xl;
}

.modal-header {
    @apply px-6 py-4 border-b border-slate-200 flex items-center justify-between bg-slate-50;
}

.modal-body {
    @apply p-6 overflow-y-auto flex-1;
}

.modal-close {
    @apply h-8 w-8 rounded-full bg-slate-200 hover:bg-slate-300 flex items-center justify-center text-slate-700 font-bold transition-colors;
}

/* Tables */
.table-container {
    @apply overflow-x-auto;
}

.table {
    @apply w-full text-left border-collapse;
}

.table-header {
    @apply bg-slate-50 text-slate-500 text-xs font-semibold border-b border-slate-200;
}

.table-header-cell {
    @apply py-3.5 px-6;
}

.table-row {
    @apply divide-y divide-slate-200 text-sm;
}

.table-cell {
    @apply py-4 px-6;
}

/* Form elements */
.form-input {
    @apply w-full px-4 py-2.5 rounded-xl border border-slate-300 text-sm focus:border-red-600 focus:outline-hidden focus:ring-1 focus:ring-red-600 transition-all duration-150;
}

.form-label {
    @apply block text-xs font-bold text-slate-700 uppercase mb-1 tracking-wider;
}

.form-group {
    @apply mb-4;
}

/* Alert / Toast */
.toast {
    @apply fixed bottom-6 right-6 z-[60] px-4 py-3 rounded-xl text-white font-semibold text-sm shadow-xl border border-white/20 backdrop-blur-md animate-in slide-in-from-bottom-4 duration-300;
}

.toast-success {
    @apply bg-emerald-600;
}

.toast-error {
    @apply bg-red-600;
}

.toast-info {
    @apply bg-blue-600;
}

/* Navigation */
.navbar {
    @apply sticky top-0 z-50 bg-white/90 backdrop-blur-md border-b border-slate-200 shadow-xs;
}

.navbar-content {
    @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between;
}

.nav-tabs {
    @apply hidden md:flex items-center space-x-1 bg-slate-100 p-1 rounded-xl border border-slate-200/80;
}

.nav-tab-active {
    @apply bg-white text-red-600 shadow-xs font-semibold px-4 py-1.5 rounded-lg text-sm transition-all duration-150;
}

.nav-tab-inactive {
    @apply text-slate-600 hover:text-slate-900 px-4 py-1.5 rounded-lg text-sm transition-all duration-150;
}

/* Hero section */
.hero-badge {
    @apply inline-flex items-center space-x-2 px-3.5 py-1.5 rounded-full bg-red-100 border border-red-200 text-red-700 text-xs font-semibold shadow-xs;
}

.hero-badge-dot {
    @apply flex h-2 w-2 rounded-full bg-red-600 animate-pulse;
}

/* Utility classes */
.text-balance {
    text-wrap: balance;
}

.shadow-soft {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.ease-custom {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loader spinner */
.loader {
    @apply inline-block w-5 h-5 border-2 border-current border-t-transparent rounded-full animate-spin;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .modal-panel {
        @apply max-w-full rounded-none rounded-t-3xl;
    }
    
    .modal-body {
        @apply p-4;
    }
}