/* Mini Trello - Stylesheet */

#mini-trello-app, .mt-app * {
    box-sizing: border-box;
}

.mt-app {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #172b4d;
    min-height: 500px;
    position: relative;
}

.mt-loading {
    padding: 40px;
    text-align: center;
    color: #6b778c;
}

.mt-login-notice {
    text-align: center;
    padding: 40px 20px;
}

/* ---------- Buttons ---------- */
.mt-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}
.mt-btn-primary {
    background: #0079bf;
    color: #fff;
}
.mt-btn-primary:hover {
    background: #026aa7;
    color: #fff;
}
.mt-btn-secondary {
    background: #ebecf0;
    color: #172b4d;
}
.mt-btn-secondary:hover {
    background: #dfe1e6;
}
.mt-btn-danger {
    background: #eb5a46;
    color: #fff;
}
.mt-btn-danger:hover {
    background: #cf513d;
}
.mt-btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b778c;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 3px;
}
.mt-btn-icon:hover {
    background: rgba(9, 30, 66, 0.08);
}

/* ---------- Settings / dropdown menu ---------- */
.mt-settings-menu-wrap {
    position: relative;
    display: inline-block;
}
.mt-settings-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    color: #44546f;
    transition: background 0.15s ease, color 0.15s ease;
}
.mt-settings-trigger:hover {
    background: #ebecf0;
    color: #172b4d;
}
.mt-settings-trigger-active {
    background: #dfe1e6;
    color: #172b4d;
}
.mt-icon-on-board {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: rgba(255,255,255,0.9);
}
.mt-icon-on-board:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.mt-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 16px -4px rgba(9,30,66,0.25), 0 0 1px rgba(9,30,66,0.31);
    padding: 6px;
    z-index: 50;
}
.mt-dropdown-menu.mt-dropdown-open {
    display: block;
}
.mt-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 14px;
    color: #172b4d;
    cursor: pointer;
}
.mt-dropdown-item:hover {
    background: #f4f5f7;
}
.mt-dropdown-item svg {
    flex-shrink: 0;
    color: #6b778c;
}

/* ---------- Boards list (overview page) ---------- */
.mt-boards-overview {
    padding: 20px;
}
.mt-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.mt-overview-header-actions {
    display: flex;
    gap: 8px;
}
.mt-boards-overview h2 {
    margin: 0;
}
.mt-boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.mt-board-tile {
    height: 100px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: #0079bf;
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 10px 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 0 0 200px rgba(0,0,0,0.15);
    transition: box-shadow 0.15s ease;
}
.mt-board-tile:hover {
    box-shadow: inset 0 0 0 200px rgba(0,0,0,0.3);
    color: #fff;
}
.mt-board-tile-new {
    background: #ebecf0;
    color: #172b4d;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}
.mt-board-tile-new:hover {
    background: #dfe1e6;
    box-shadow: none;
}

/* ---------- Board view ---------- */
.mt-board-view {
    min-height: 600px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: #0079bf;
    padding: 14px;
}

.mt-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
}
.mt-board-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mt-board-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 3px;
}
.mt-board-title:hover, .mt-board-title:focus {
    background: rgba(255,255,255,0.2);
    outline: none;
}
.mt-back-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
}
.mt-back-link:hover {
    opacity: 1;
    color: #fff;
}
.mt-board-updated-by {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    margin-left: 4px;
}
.mt-updated-by {
    white-space: nowrap;
}
.mt-board-header-right {
    display: flex;
    gap: 8px;
}

/* ---------- Lists row ---------- */
.mt-lists-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.mt-list {
    background: #ebecf0;
    border-radius: 6px;
    width: 272px;
    min-width: 272px;
    max-height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    padding: 8px;
}
.mt-list.mt-drag-over {
    background: #dce0e6;
    outline: 2px dashed #0079bf;
}

.mt-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px 8px 6px;
}
.mt-list-title {
    font-weight: 600;
    font-size: 14px;
    background: transparent;
    border: none;
    width: 100%;
    padding: 4px;
    border-radius: 3px;
}
.mt-list-title:hover, .mt-list-title:focus {
    background: #fff;
    outline: none;
}

.mt-cards-container {
    overflow-y: auto;
    flex: 1;
    min-height: 10px;
    padding: 0 2px;
}

.mt-card {
    background: #fff;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 0 rgba(9,30,66,0.25);
    cursor: grab;
    font-size: 14px;
}
.mt-card:hover {
    background: #f4f5f7;
}
.mt-card.mt-dragging {
    opacity: 0.4;
}

.mt-card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.mt-card-label {
    height: 8px;
    width: 32px;
    border-radius: 4px;
}
.mt-card-labels.mt-labels-expanded .mt-card-label {
    height: 18px;
    width: auto;
    padding: 0 6px;
    font-size: 11px;
    color: #fff;
    display: flex;
    align-items: center;
}

.mt-card-title {
    color: #172b4d;
    word-break: break-word;
}

.mt-card-meta {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    color: #6b778c;
}
.mt-card-due {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #ebecf0;
}
.mt-card-due.mt-due-overdue {
    background: #eb5a46;
    color: #fff;
}
.mt-card-updated-by {
    margin-top: 6px;
    font-size: 11px;
    color: #9fadbc;
}

.mt-add-card-btn, .mt-add-list-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: #5e6c84;
    padding: 8px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}
.mt-add-card-btn:hover, .mt-add-list-btn:hover {
    background: rgba(9,30,66,0.08);
    color: #172b4d;
}

.mt-add-list-column {
    width: 272px;
    min-width: 272px;
    background: rgba(255,255,255,0.24);
    border-radius: 6px;
    padding: 8px;
}
.mt-add-list-column .mt-add-list-btn {
    color: #fff;
}
.mt-add-list-column .mt-add-list-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Inline mini forms (add card / add list) */
.mt-inline-form textarea, .mt-inline-form input[type="text"] {
    width: 100%;
    border: 1px solid #dfe1e6;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    margin-bottom: 6px;
}
.mt-inline-form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- Modal (card detail) ---------- */
.mt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9,30,66,0.54);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    z-index: 9999;
    overflow-y: auto;
}
.mt-modal {
    background: #f4f5f7;
    width: 100%;
    max-width: 600px;
    border-radius: 6px;
    padding: 20px;
    position: relative;
}
.mt-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b778c;
}
.mt-modal-title {
    width: 100%;
    font-size: 18px;
    font-weight: 700;
    border: 1px solid transparent;
    background: transparent;
    padding: 6px 8px;
    border-radius: 3px;
    margin-bottom: 16px;
    margin-right: 20px;
}
.mt-modal-title:hover, .mt-modal-title:focus {
    background: #fff;
    border-color: #dfe1e6;
    outline: none;
}
.mt-modal-updated-by {
    font-size: 12px;
    color: #6b778c;
    margin: -8px 0 16px 8px;
}
.mt-modal-section {
    margin-bottom: 18px;
}
.mt-modal-section-label {
    font-size: 12px;
    font-weight: 700;
    color: #5e6c84;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.mt-modal textarea, .mt-modal input[type="text"], .mt-modal input[type="datetime-local"] {
    width: 100%;
    border: 1px solid #dfe1e6;
    border-radius: 3px;
    padding: 8px;
    font-size: 14px;
    font-family: inherit;
}
.mt-modal textarea {
    min-height: 80px;
    resize: vertical;
}

.mt-label-editor {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mt-label-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}
.mt-label-chip button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.8;
}
.mt-label-add-row {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.mt-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}
.mt-color-swatch.mt-selected {
    border-color: #172b4d;
}
.mt-color-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.mt-modal-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #dfe1e6;
}

/* Board settings panel */
.mt-bg-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.mt-bg-color-swatch {
    width: 40px;
    height: 28px;
    border-radius: 3px;
    cursor: pointer;
    border: 2px solid transparent;
}
.mt-bg-color-swatch.mt-selected {
    border-color: #172b4d;
}

.mt-member-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.mt-member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0079bf;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.mt-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #172b4d;
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}
.mt-toast.mt-toast-show {
    opacity: 1;
    transform: translateY(0);
}
.mt-toast.mt-toast-error {
    background: #eb5a46;
}
