/* Save Icon */
.selecoes-save-icon {
    display: inline-block;
}

.selecoes-save-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 18px;
}

.selecoes-save-btn:hover {
    background: #f0f0f0;
}

.selecoes-save-btn svg {
    color: #666;
    transition: all 0.3s ease;
}

.selecoes-save-btn.saved svg {
    color: #c20014;
    fill: currentColor;
}

/* Modals */
.selecoes-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.selecoes-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.selecoes-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: between;
    align-items: center;
}

.selecoes-modal-header h3 {
    margin: 0;
    flex: 1;
}

.selecoes-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    color:#999;
    font-weight: normal;
    line-height: 30px;
}

.selecoes-modal-body {
    padding: 20px;
}

/* List Items */
.selecoes-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.selecoes-add-to-list {
    background: #0b8c4a;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size:11px;
}

.selecoes-remove-from-list {
    background: #c20014;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
}

/* Create Form */
.selecoes-create-form input,
.selecoes-create-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.selecoes-create-form textarea {
    height: 80px;
    resize: vertical;
}

.selecoes-create-form button {
    background: #005597;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
}

/* User Selections Page */
.selecoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.selecoes-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: white;
}

.selecoes-card:hover {
background: #fcfcfc;
}

.selecoes-card h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.selecoes-description {
    color: #666;
    margin-bottom: 10px;
}

.selecoes-meta {
    color: #999;
    margin-bottom: 15px;
}

.selecoes-actions {
    display: flex;
    gap: 10px;
}

.selecoes-edit-btn, .selecoes-edit-btn:link, .selecoes-edit-btn:visited, .selecoes-edit-btn:active, .selecoes-edit-save-btn {
    background: #005597;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    border:0px;
}

*[class^="selecoes-"] button:not(.selecoes-modal-close){font-weight: bold;font-size: 11px;}
*[class^="selecoes-"] button[type="submit"] {font-weight: bold;font-size: 12px;}
*[class^="selecoes-"] button[type="submit"]:hover {background: #0b8c4a;}

.selecoes-delete-btn {
    background: #c20014;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
}

/* Loading States */
.selecoes-loading {
    opacity: 0.6;
    pointer-events: none;
}

.selecoes-message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 12px;
}

.selecoes-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.selecoes-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.selecao-header {
    margin-bottom: 40px;
    padding-bottom:10px;
    border-bottom: 1px solid #eee;
}

.selecao-description {
    text-align: left;
    margin: 20px auto;
}

.selecao-meta {
    color: #999;
    font-size: 0.9em;
}

.selecao-meta span {
    margin: 0px 5px 0 0;
}

/* Posts list */
.selecao-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.selecao-post-item {
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: white;
}

.selecao-post-item h2 {
    margin: 0 0 10px 0;
}

.selecao-post-item h2 a {
    text-decoration: none;
    color: #333;
}

.selecao-post-item h2 a:hover {
    color: #0073aa;
}

.post-excerpt {
    color: #666;
    margin-bottom: 10px;
}

.post-meta {
    color: #999;
    font-size: 0.9em;
}

/* Edit page */
.selecao-edit-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.selecao-edit-form {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
}

.selecoes-edit-save-btn {}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 12px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.selecao-posts-edit {
    margin-bottom: 30px;
}

.selecao-post-edit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 10px;
}

.selecao-post-edit-item h3 {
    margin: 0;
    flex: 1;
}

.selecao-post-edit-item h3 a {
    text-decoration: none;
    color: #333;
}

.selecoes-remove-post-btn {
    background: #c20014;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
}

.selecao-delete-section {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
}

.selecoes-delete-selection-btn {
    background: #c20014;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #0073aa;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.selecao-edit-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.post-info h3 {
    margin: 0 0 5px 0;
}

.post-date {
    color: #666;
    font-size: 0.9em;
}

/* Loading state */
.selecoes-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.selecoes-loading::after {
    content: 'Carregando...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.8);
    padding: 10px;
    border-radius: 12px;
}

/* Selection list states */
.selecoes-list-item.in-selection {
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
}

.selecoes-list-actions {
    display: flex;
    gap: 10px;
}

.selecoes-add-to-list:hover {
    background: #1a7e31;
}

.selecoes-remove-from-list:hover {
    background: #c82333;
}

/* Status indicator */
.selecoes-list-status {
    font-size: 12px;
    color: #6c757d;
    margin-left: 10px;
}

.selecoes-list-item.in-selection .selecoes-list-status {
    color: #28a745;
    font-weight: bold;
}

.selecoes-remove-post-from-list {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
}

.selecoes-remove-post-from-list:hover {
    background: #c82333;
}

.selecoes-remove-post-from-list:disabled {
    background: #6c757d;
    cursor: not-allowed;
}