/* Black & White Theme - Rise Triggers Builder */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #000;
    background: #fff;
    min-height: 100vh;
}

/* Tip/Callout boxes - ensure readable contrast */
.tip-box {
    border: 2px solid #000;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 12px;
}

.tip-box--dark,
.tip-box[style*="background:#111"],
.tip-box[style*="background: #111"],
.tip-box[style*="background:#000"],
.tip-box[style*="background: #000"] {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

.tip-box--dark a,
.tip-box--dark strong,
.tip-box--dark em,
.tip-box[style*="background:#111"] a,
.tip-box[style*="background:#111"] strong,
.tip-box[style*="background:#111"] em,
.tip-box[style*="background:#000"] a,
.tip-box[style*="background:#000"] strong,
.tip-box[style*="background:#000"] em {
    color: #fff !important;
}

.tip-box code {
    background: #f0f0f0;
    color: #000;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.tip-box--dark code,
.tip-box[style*="background:#111"] code,
.tip-box[style*="background:#000"] code {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 2000;
}

.toast {
    background: #000;
    color: #fff;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 240px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.2s ease;
}

.toast--success { background: #0f0f0f; border-color: #0f0f0f; }
.toast--warning { background: #1a1a1a; border-color: #1a1a1a; }
.toast--error { background: #000; border-color: #000; }

.toast__icon svg { width: 18px; height: 18px; }
.toast__message { font-size: 0.9rem; line-height: 1.3; }
.toast__close { margin-left: auto; cursor: pointer; opacity: 0.8; }
.toast__close:hover { opacity: 1; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation */
.navbar {
    background: #000;
    color: #fff;
    padding: 0;
    border-bottom: 3px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.nav-brand h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover {
    color: #fff;
    background: #333;
    border-color: #555;
    transform: translateY(-1px);
}

.nav-link.active {
    color: #000;
    background: #fff;
    border-color: #fff;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.nav-link.active:hover {
    color: #000;
    background: #f5f5f5;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0 2rem 0;
    border-bottom: 2px solid #000;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 0 0 16px 16px;
}

.header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #000;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Main Content */
.main-content {
    max-width: 900px;
    margin: 0 auto;
}

section {
    margin-bottom: 4rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #000;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #000;
}

/* Form Header */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.form-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid #000;
    border-radius: 8px;
    background: #fff;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #000;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    background: #fff;
    color: #000;
}

.btn:hover {
    background: #000;
    color: #fff;
}

.btn-primary {
    background: #000;
    color: #fff;
}

.btn-primary:hover {
    background: #333;
    border-color: #333;
}

/* Alias for .btn.primary used on support page */
.btn.primary { background: #000; color: #fff; }
.btn.primary:hover { background: #333; border-color: #333; }

/* Center button content */
.donation-card .btn { justify-content: center; text-align: center; }

.btn-secondary {
    background: #fff;
    color: #000;
    border-color: #000;
}

.btn-secondary:hover {
    background: #000;
    color: #fff;
}

.btn:disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background: #f5f5f5;
    color: #999;
}

.icon {
    font-size: 1rem;
}

/* Forms */
.trigger-form {
    background: #f8f8f8;
    padding: 2rem;
    border: 2px solid #000;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #000;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #000;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
    min-height: 120px;
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

.action-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #000;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #000;
}

/* Triggers List */
.triggers-list {
    display: grid;
    gap: 1.5rem;
}

.trigger-item {
    background: #fff;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.trigger-item:hover {
    background: #f8f8f8;
    border-color: #333;
}

.trigger-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.trigger-title {
    font-weight: 700;
    color: #000;
    margin-bottom: 0.25rem;
    font-size: 16px;
}

.trigger-subtitle {
    color: #666;
    font-size: 14px;
}

.trigger-actions {
    display: flex;
    gap: 0.5rem;
}

.trigger-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 12px;
}

.trigger-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.detail-value {
    font-weight: 500;
    color: #000;
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* Quick Actions */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    border: 2px solid #000;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: #000;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    min-height: 80px;
    justify-content: center;
}

.action-btn:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn:active {
    transform: translateY(0);
}

.action-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    flex-shrink: 0;
}

.action-btn span {
    text-align: center;
    line-height: 1.2;
}

.secondary-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.secondary-actions .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

/* Code Display */
.code-tabs {
    display: flex;
    margin-bottom: 1rem;
    border: 2px solid #000;
    border-radius: 4px;
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    background: #fff;
    color: #000;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-right: 1px solid #000;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn.active {
    background: #000;
    color: #fff;
}

.tab-btn:hover:not(.active) {
    background: #f5f5f5;
}

.code-content {
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

pre {
    background: #000;
    color: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 1rem;
    border: 2px solid #000;
}

code {
    font-family: 'Courier New', 'Monaco', monospace;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 12px;
    z-index: 10;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 1px solid #000;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fff;
    color: #000;
}

.status-execute {
    background: #000;
    color: #fff;
}

.status-state {
    background: #666;
    color: #fff;
    border-color: #666;
}

.status-url {
    background: #333;
    color: #fff;
    border-color: #333;
}

.status-lesson {
    background: #999;
    color: #fff;
    border-color: #999;
}

/* Instructions */
.instructions-list {
    list-style: none;
    counter-reset: step-counter;
}

.instructions-list li {
    counter-increment: step-counter;
    margin-bottom: 1rem;
    padding-left: 3rem;
    position: relative;
    line-height: 1.6;
}

.instructions-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .container {
        padding: 1rem;
    }

    .header h2 {
        font-size: 2rem;
    }

    .form-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .trigger-header {
        flex-direction: column;
        gap: 1rem;
    }

    .trigger-details {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .action-btn {
        padding: 0.75rem 0.5rem;
        min-height: 70px;
        font-size: 0.8rem;
    }
    
    .action-icon {
        width: 18px;
        height: 18px;
    }
    
    .secondary-actions {
        flex-direction: column;
    }

    .instructions-list li {
        padding-left: 2.5rem;
    }

    .instructions-list li::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 10px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trigger-form {
    animation: slideIn 0.3s ease;
}

.trigger-item {
    animation: slideIn 0.3s ease;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-small {
    font-size: 0.875rem;
}

.font-mono {
    font-family: 'Courier New', 'Monaco', monospace;
}

.border-bottom {
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

/* Focus styles for accessibility */
.btn:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .trigger-actions {
        display: none;
    }
    
    body {
        background: #fff;
        color: #000;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Support Page */
.support-content {
    display: grid;
    gap: 2rem;
}

.support-note { text-align: center; }

.donation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.donation-card {
    border: 2px solid #000;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.donation-card h3 { margin: 0.75rem 0 0.25rem 0; }
.donation-card p { color: #666; font-size: 0.95rem; margin-bottom: 0.75rem; }

.donation-image-wrap {
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #000;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.donation-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Keep action buttons aligned to the bottom of each card */
.donation-card .btn { margin-top: auto; }

.other-support ul { margin-left: 1rem; }
.other-support li { margin: 0.25rem 0; }

.animate { animation: slideIn 0.3s ease; }

@media (max-width: 768px) {
    .donation-options { grid-template-columns: 1fr; }
}