/* SDPM Floating To-Do Button & Panel */

/* Button */
#sdpm-todo-btn {
    position: fixed;
    z-index: 99999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(34,113,177,0.4);
    cursor: pointer;
    font-size: 28px;
    line-height: 56px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#sdpm-todo-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(34,113,177,0.5);
}
#sdpm-todo-btn .sdpm-todo-icon {
    transition: transform 0.3s;
    display: block;
    line-height: 1;
    font-size: 28px;
    font-weight: 300;
}
#sdpm-todo-btn.active .sdpm-todo-icon {
    transform: rotate(45deg);
}

/* Positions */
.sdpm-todo-pos-bottom-center {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
}
.sdpm-todo-pos-bottom-center:hover {
    transform: translateX(-50%) scale(1.1);
}
.sdpm-todo-pos-bottom-left {
    bottom: 24px;
    left: 24px;
}
.sdpm-todo-pos-bottom-right {
    bottom: 24px;
    right: 24px;
}
.sdpm-todo-pos-top-left {
    top: 72px;
    left: 24px;
}
.sdpm-todo-pos-top-right {
    top: 72px;
    right: 24px;
}

/* Modal Overlay */
#sdpm-todo-modal {
    position: fixed;
    z-index: 99998;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.sdpm-todo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

/* Panel */
.sdpm-todo-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 560px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.sdpm-todo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f1;
    background: #f8f9fa;
}
.sdpm-todo-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}
.sdpm-todo-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #8c8f94;
    padding: 0 4px;
    line-height: 1;
}
.sdpm-todo-close:hover { color: #1d2327; }

/* Tabs */
.sdpm-todo-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f1;
    background: #fff;
}
.sdpm-todo-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: #646970;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 2px solid transparent;
    text-align: center;
}
.sdpm-todo-tab:hover { color: #2271b1; }
.sdpm-todo-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
    font-weight: 600;
}

/* Body */
.sdpm-todo-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 200px;
    max-height: 50vh;
}
.sdpm-todo-tab-content { display: none; }
.sdpm-todo-tab-content.active { display: block; }

.sdpm-todo-url-bar {
    font-size: 12px;
    color: #8c8f94;
    word-break: break-all;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tasks */
.sdpm-todo-task-items { list-style: none; padding: 0; margin: 0; }
.sdpm-todo-task-items li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
}
.sdpm-todo-task-items li:last-child { border-bottom: none; }
.sdpm-todo-task-done label { text-decoration: line-through; color: #8c8f94; }

/* Project Card */
.sdpm-todo-project-card {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}
.sdpm-todo-project-card h4 { margin: 0 0 8px; }
.sdpm-todo-project-card h5 { margin: 12px 0 6px; font-size: 13px; }
.sdpm-todo-notes-list { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.sdpm-todo-notes-list li { padding: 4px 0; border-bottom: 1px solid #e5e5e5; }
.sdpm-todo-notes-list li small { color: #8c8f94; }

/* Progress */
.sdpm-todo-progress {
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}
.sdpm-todo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #46b450);
    border-radius: 3px;
    transition: width 0.5s;
}

/* Parse Result */
.sdpm-todo-parse-result {
    margin-top: 8px;
    padding: 12px;
    background: #f0f8f0;
    border-left: 3px solid #46b450;
    border-radius: 4px;
}

/* Footer */
.sdpm-todo-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f1;
    background: #f8f9fa;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
}
.sdpm-todo-footer a { text-decoration: none; color: #2271b1; }
.sdpm-todo-footer a:hover { text-decoration: underline; }

/* Messages */
#sdpm-todo-message {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    display: none;
}
.sdpm-todo-msg-success { color: #46b450; }
.sdpm-todo-msg-error { color: #dc3232; }

/* Empty state */
.sdpm-empty { color: #8c8f94; font-style: italic; }

/* Admin Bar spacing for top positions */
body.admin-bar .sdpm-todo-pos-top-left,
body.admin-bar .sdpm-todo-pos-top-right {
    top: 100px;
}
