/* Custom styles to complement Tailwind CSS */

/* Satoshi Font */
@font-face {
    font-family: 'Satoshi';
    src: url('/assets/font/Satoshi-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Satoshi';
    src: url('/assets/font/Satoshi-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Satoshi';
    src: url('/assets/font/Satoshi-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
    font-family: 'Satoshi', sans-serif;
}

/* Smooth transitions for all interactive elements */
input,
textarea,
select,
button,
a {
    transition: all 0.2s ease-in-out;
}

/* Custom focus ring for better accessibility */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Sleek, slimmer form controls across the app */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea,
select {
    padding: 0.5rem 0.75rem !important;
    min-height: 2.25rem;
}

textarea.autosize-textarea {
    overflow: hidden;
    resize: none;
}

/* Rich content editor (Notion-like) */
.rich-editor {
    line-height: 1.7;
    color: #1f2937;
}

.rich-editor:focus {
    outline: none;
}

.rich-editor h1,
.rich-editor h2,
.rich-editor h3,
.rich-editor h4,
.rich-editor h5,
.rich-editor h6 {
    font-weight: 700;
    color: #111827;
    margin: 0.6rem 0 0.35rem;
}

.rich-editor h1 { font-size: 1.75rem; }
.rich-editor h2 { font-size: 1.45rem; }
.rich-editor h3 { font-size: 1.2rem; }

.rich-editor p {
    margin: 0.45rem 0;
}

.rich-editor ul,
.rich-editor ol {
    margin: 0.5rem 0;
    padding-left: 1.4rem;
}

.rich-editor pre {
    background: #0b1220;
    color: #f3f4f6;
    border-radius: 0.6rem;
    padding: 0.8rem 0.95rem;
    overflow-x: auto;
    margin: 0.7rem 0;
}

.rich-editor code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.rich-editor .ProseMirror h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.6rem 0 0.35rem;
    color: #111827;
}

.rich-editor .ProseMirror h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0.6rem 0 0.35rem;
    color: #111827;
}

.rich-editor .ProseMirror ul,
.rich-editor .ProseMirror ol {
    margin: 0.5rem 0;
    padding-left: 1.4rem;
}

.rich-editor .ProseMirror li {
    margin: 0.15rem 0;
}

.rich-editor .ProseMirror pre {
    background: #0b1220;
    color: #f3f4f6;
    border-radius: 0.6rem;
    padding: 0.8rem 0.95rem;
    overflow-x: auto;
    margin: 0.7rem 0;
}

.rich-editor .ProseMirror pre code {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
}

.rich-editor .ProseMirror p {
    margin: 0.45rem 0;
}

/* Button hover effects */
button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Checkbox custom styling */
input[type="checkbox"] {
    cursor: pointer;
    accent-color: #2563eb;
}

/* Link underline animation - removed for entire project */

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .logo-container {
        left: 1.5rem;
        top: 1.5rem;
    }
    
    .login-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    /* Spaces breadcrumb text size */
    .spaces-breadcrumb h2 {
        font-size: 0.875rem !important;
    }

    /* Spaces search box layout - stack below breadcrumb */
    .spaces-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .spaces-header .search-container {
        width: 100% !important;
    }

    .spaces-header .search-container input {
        width: 100% !important;
    }
}

/* Loading state for buttons */
button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* Error message styling */
.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.visible {
    display: block;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Success message styling */
.success-message {
    color: #16a34a;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.success-message.visible {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
