/**
 * Clorinda Listado Borradores - Styles
 * @version 1.5.2
 */

/* Modal Background */
.clorinda-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal Content */
.clorinda-modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.clorinda-modal-header {
    padding: 24px 24px 16px;
    background-color: #fff;
    position: relative;
    border-bottom: 1px solid #eaeaea;
}

.clorinda-modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    color: #d4a017;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-align: center;
}

.clorinda-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    font-weight: normal;
    cursor: pointer;
    color: #777;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.clorinda-modal-close:hover {
    color: #000;
    background-color: #f0f0f0;
}

/* Modal Body */
.clorinda-modal-body {
    padding: 24px;
    min-height: 150px;
    font-size: 14px;
    line-height: 1.5;
    color: #3a3a3a;
    overflow-y: auto;
    flex-grow: 1;
    border: 1px solid #d4a017;
    border-radius: 8px;
    margin: 0 24px 24px;
}

/* Loading & Error messages */
.clorinda-modal-body .loading,
.clorinda-modal-body .error {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Drafts List */
.clorinda-drafts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: calc(70vh - 220px);
    /* Eliminamos overflow-y: auto aquí */
}

.clorinda-draft-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.clorinda-draft-item:hover {
    background-color: #f8f9fa;
    border-color: #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.clorinda-draft-item:last-child {
    margin-bottom: 0;
}

.clorinda-draft-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #222;
    font-size: 14px;
    line-height: 1.4;
}

.clorinda-draft-meta {
    font-size: 12px;
    color: #777;
}

.clorinda-draft-author {
    display: inline-block;
}

/* Modal Footer */
.clorinda-modal-footer {
    padding: 20px 24px;
    background-color: #fff;
    text-align: right;
}

.clorinda-modal-cancel {
    background-color: #d4a017;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clorinda-modal-cancel:hover {
    background-color: #c49000;
    transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .clorinda-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 80vh;
    }
    
    .clorinda-modal-header,
    .clorinda-modal-body,
    .clorinda-modal-footer {
        padding: 16px;
    }
    
    .clorinda-modal-header h2 {
        font-size: 1.5em;
    }
    
    .clorinda-modal-body {
        margin: 0 16px 16px;
    }
    
    .clorinda-draft-item {
        padding: 10px 12px;
    }
    
    .clorinda-drafts-list {
        max-height: calc(80vh - 180px);
    }
}