/*
Aepto Documentation - Component Styles
Reusable UI components following Aepto's design system
*/

/* ===========================
   Buttons
   =========================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius-button);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

/* Primary Button */
.btn-primary {
    background: var(--aepto-primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--aepto-bg-card);
    color: var(--aepto-text-primary);
    border: 1px solid var(--aepto-border-color);
}

.btn-secondary:hover {
    background-color: var(--aepto-bg-light);
    border-color: var(--aepto-primary-start);
    color: var(--aepto-primary-start);
}

/* Success Button */
.btn-success {
    background: var(--aepto-success-gradient);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 176, 155, 0.3);
    color: white;
}

/* Info Button */
.btn-info {
    background: var(--aepto-info-gradient);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
    color: white;
}

/* Warning Button */
.btn-warning {
    background: var(--aepto-warning-gradient);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.3);
    color: white;
}

/* Outline Buttons */
.btn-outline-primary {
    background-color: transparent;
    color: var(--aepto-primary-start);
    border: 1px solid var(--aepto-primary-start);
}

.btn-outline-primary:hover {
    background-color: var(--aepto-primary-start);
    color: white;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ===========================
   Cards
   =========================== */

.doc-card {
    background: var(--aepto-bg-card);
    border-radius: var(--border-radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    border: 1px solid var(--aepto-border-color);
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* Card Header */
.doc-card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--aepto-border-color);
}

.doc-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--aepto-text-primary);
}

.doc-card-subtitle {
    font-size: 0.875rem;
    color: var(--aepto-text-secondary);
    margin: 0;
}

/* Card Body */
.doc-card-body {
    /* Color inherits from parent - don't force dark text */
}

/* Card Footer */
.doc-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--aepto-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Feature Cards */
.feature-card {
    background: var(--aepto-bg-card);
    border-radius: var(--border-radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid var(--aepto-border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--aepto-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--aepto-text-primary);
}

.feature-description {
    color: var(--aepto-text-secondary);
    flex: 1;
}

/* ===========================
   Badges
   =========================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    white-space: nowrap;
}

.badge-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: var(--aepto-primary-start);
}

.badge-success {
    background: linear-gradient(135deg, rgba(0, 176, 155, 0.1) 0%, rgba(150, 201, 61, 0.1) 100%);
    color: #00b09b;
}

.badge-info {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    color: #4facfe;
}

.badge-warning {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    color: #f5576c;
}

/* ===========================
   Code Blocks
   =========================== */

.code-block {
    background-color: #f7fafc;
    border: 1px solid var(--aepto-border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-block code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
    font-size: inherit;
    color: #2d3748;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--aepto-primary-gradient);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.code-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Inline Code */
code:not(pre code) {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--aepto-primary-start);
    padding: 0.125rem 0.25rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
    font-weight: 500;
}

/* ===========================
   Tables
   =========================== */

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--aepto-bg-card);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.doc-table th,
.doc-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--aepto-border-color);
}

.doc-table th {
    background-color: var(--aepto-bg-light);
    font-weight: 600;
    color: var(--aepto-text-primary);
}

.doc-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.02);
}

.doc-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===========================
   Alerts
   =========================== */

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-card);
    margin: 1rem 0;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.alert-primary {
    background-color: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
    color: var(--aepto-primary-start);
}

.alert-success {
    background-color: rgba(0, 176, 155, 0.1);
    border-color: rgba(0, 176, 155, 0.2);
    color: #00b09b;
}

.alert-warning {
    background-color: rgba(245, 87, 108, 0.1);
    border-color: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

.alert-info {
    background-color: rgba(79, 172, 254, 0.1);
    border-color: rgba(79, 172, 254, 0.2);
    color: #4facfe;
}

/* ===========================
   Lists
   =========================== */

.doc-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.doc-list li {
    margin-bottom: 0.5rem;
    color: var(--aepto-text-secondary);
}

.doc-list li::marker {
    color: var(--aepto-primary-start);
}

/* Checklists */
.checklist {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--aepto-text-secondary);
}

.checklist li::before {
    content: '✓';
    color: #00b09b;
    font-weight: bold;
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-top: -0.125rem;
}

/* ===========================
   Navigation Pills
   =========================== */

.nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.nav-pills .nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--aepto-bg-light);
    color: var(--aepto-text-secondary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--aepto-primary-start);
}

.nav-pills .nav-link.active {
    background: var(--aepto-primary-gradient);
    color: white;
}

/* ===========================
   Progress Bars
   =========================== */

.progress {
    height: 8px;
    background-color: var(--aepto-bg-light);
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--aepto-primary-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===========================
   Form Elements
   =========================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--aepto-text-primary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--aepto-border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background-color: var(--aepto-bg-card);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--aepto-primary-start);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===========================
   Utility Classes
   =========================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-full { width: 100%; }

/* ===========================
   Animations
   =========================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ===========================
   Responsive Components
   =========================== */

@media (max-width: 768px) {
    .doc-card,
    .feature-card {
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .doc-table th,
    .doc-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    .nav-pills {
        justify-content: center;
    }

    .feature-card {
        margin-bottom: 1rem;
    }
}
