/**
 * BIOINTE - COMPONENTS STYLES
 * Buttons, Cards, Forms, Modals, etc.
 */

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: var(--font-semibold);
    font-size: 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-active);
    border-color: var(--border-medium);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ==========================================
   CARDS
   ========================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-hover);
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    position: relative;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.feature-card.featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.feature-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: var(--gradient-primary);
    color: white;
    font-size: 11px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 24px;
    display: block;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: var(--font-bold);
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

.feature-highlight {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    color: var(--primary);
    font-size: 14px;
    text-align: center;
}

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.pricing-card {
    padding: 40px 32px;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    position: relative;
}

.pricing-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.pricing-card.popular {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 20px;
    background: var(--gradient-primary);
    color: white;
    font-size: 12px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.plan-header {
    text-align: center;
    margin-bottom: 24px;
}

.plan-header h3 {
    font-size: 24px;
    font-weight: var(--font-extrabold);
    margin-bottom: 8px;
}

.plan-header p {
    color: var(--text-secondary);
    margin: 0;
}

.plan-price {
    text-align: center;
    margin-bottom: 32px;
}

.price {
    font-size: 56px;
    font-weight: var(--font-extrabold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.period {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.plan-features {
    margin-bottom: 32px;
}

.plan-features li {
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    border-bottom: 1px solid var(--border-light);
}

.plan-features li:last-child {
    border-bottom: none;
}

.btn-plan {
    width: 100%;
    padding: 16px;
    background: transparent;
    color: var(--primary);
    font-weight: var(--font-bold);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-plan:hover {
    background: var(--primary);
    color: white;
}

.btn-plan.primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-plan.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.pricing-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
}

.toggle-btn {
    padding: 12px 24px;
    background: white;
    color: var(--text-secondary);
    font-weight: var(--font-semibold);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.discount {
    padding: 2px 8px;
    background: var(--success);
    color: white;
    font-size: 11px;
    font-weight: var(--font-bold);
    border-radius: var(--radius-sm);
}

/* Testimonial Cards */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.testimonial-card {
    padding: 32px;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.testimonial-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stars {
    color: #fbbf24;
    font-size: 18px;
    margin-bottom: 16px;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
}

.testimonial-author strong {
    display: block;
    font-size: 15px;
    color: var(--text-primary);
}

.testimonial-author span {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ==========================================
   FORMS
   ========================================== */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--text-primary);
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-checkbox,
.form-radio {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-error {
    margin-top: 8px;
    font-size: 13px;
    color: var(--error);
}

.form-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ==========================================
   MODALS
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: slideInUp var(--transition-base);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 24px;
    font-weight: var(--font-bold);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-body {
    padding: 32px;
}

.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================
   BADGES & LABELS
   ========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
}

.badge-primary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-error {
    background: var(--error-light);
    color: var(--error);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

/* ==========================================
   ALERTS
   ========================================== */

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    margin-bottom: 24px;
}

.alert-success {
    background: var(--success-light);
    border-color: var(--success);
    color: var(--success);
}

.alert-error {
    background: var(--error-light);
    border-color: var(--error);
    color: var(--error);
}

.alert-warning {
    background: var(--warning-light);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-info {
    background: var(--info-light);
    border-color: var(--info);
    color: var(--info);
}

/* ==========================================
   TOOLTIPS
   ========================================== */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--text-primary);
    color: white;
    font-size: 13px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    z-index: var(--z-tooltip);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ==========================================
   LOADING
   ========================================== */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-active) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================
   RESPONSIVE - COMPONENTS
   ========================================== */

@media (max-width: 1024px) {
    .features-grid,
    .pricing-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid,
    .pricing-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-width: 100%;
    }
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 24px;
    background: var(--text-primary);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    font-size: 15px;
    font-weight: var(--font-medium);
    z-index: var(--z-tooltip);
    transition: bottom var(--transition-base);
    min-width: 280px;
    text-align: center;
}

.toast.show {
    bottom: 32px;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--error);
}

.toast-warning {
    background: var(--warning);
}

.toast-info {
    background: var(--info);
}

@media (max-width: 640px) {
    .toast {
        min-width: calc(100% - 48px);
        max-width: calc(100% - 48px);
    }
}