/* Custom styles for Rise frontend with Tailwind CSS */

:root {
    --rise-primary: #4f46e5;
    --rise-success: #10b981;
    --rise-warning: #f59e0b;
    --rise-danger: #ef4444;
}

/* Loading spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 24rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toast-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.toast-close {
    flex-shrink: 0;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.toast-success {
    background-color: rgba(16, 185, 129, 0.95);
    color: white;
}

.toast-error {
    background-color: rgba(239, 68, 68, 0.95);
    color: white;
}

.toast-info {
    background-color: rgba(59, 130, 246, 0.95);
    color: white;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background-color: #1f2937;
    border-radius: 0.5rem;
    width: 100%;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #374151;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.modal-close-button {
    color: #9ca3af;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-button:hover {
    background-color: #374151;
    color: white;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Markdown/Prose Styling */
.prose {
    color: #d1d5db;
    line-height: 1.75;
}

.prose h1 {
    color: #f9fafb;
    font-weight: 800;
    font-size: 2.25rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
    line-height: 1.1111111;
}

.prose h2 {
    color: #f3f4f6;
    font-weight: 700;
    font-size: 1.875rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3333333;
}

.prose h3 {
    color: #f3f4f6;
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.prose h4 {
    color: #f3f4f6;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.prose p {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}

.prose li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose ul > li {
    padding-left: 0.375rem;
    list-style-type: disc;
}

.prose ol > li {
    padding-left: 0.375rem;
    list-style-type: decimal;
}

.prose code {
    color: #f3f4f6;
    background-color: #374151;
    padding: 0.25rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.prose pre {
    color: #f3f4f6;
    background-color: #1f2937;
    overflow-x: auto;
    font-size: 0.875em;
    line-height: 1.7142857;
    margin-top: 1.75rem;
    margin-bottom: 1.75rem;
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
}

.prose pre code {
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: inherit;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
}

.prose strong {
    color: #f3f4f6;
    font-weight: 600;
}

.prose em {
    color: #f3f4f6;
    font-style: italic;
}

.prose a {
    color: #60a5fa;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #93c5fd;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #f3f4f6;
    border-left-width: 0.25rem;
    border-left-color: #4b5563;
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.75rem;
    margin-bottom: 1.75rem;
    padding-left: 1rem;
}

.prose hr {
    border-color: #4b5563;
    border-top-width: 1px;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-size: 0.875em;
    line-height: 1.7142857;
}

.prose thead {
    color: #f3f4f6;
    font-weight: 600;
    border-bottom-width: 1px;
    border-bottom-color: #4b5563;
}

.prose thead th {
    vertical-align: bottom;
    padding-right: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.prose tbody tr {
    border-bottom-width: 1px;
    border-bottom-color: #374151;
}

.prose tbody tr:last-child {
    border-bottom-width: 0;
}

.prose tbody td {
    vertical-align: baseline;
    padding: 0.75rem;
}
