/* reeltools css beta 2
   estilos basicos, sin complicarse mucho */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #fdf6e3;
    color: #2d2d2d;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* header */
header {
    background: #d97706;
    color: #fff;
    padding: 16px 20px;
    text-align: center;
    border-bottom: 3px solid #92400e;
}

header h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 4px;
}

header p {
    font-size: 13px;
    opacity: 0.9;
}

/* main */
main {
    flex: 1;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 16px;
}

/* secciones */
section {
    background: #fff;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 16px;
}

section h2 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #92400e;
    border-bottom: 1px solid #fde68a;
    padding-bottom: 6px;
}

/* formulario */
form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

input[type="text"],
input[type="url"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #d6d3d1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fffdf7;
}

input:focus {
    outline: none;
    border-color: #d97706;
    background: #fff;
}

button {
    background: #d97706;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: bold;
}

button:hover {
    background: #b45309;
}

button:active {
    background: #92400e;
}

/* buscador */
#input-buscar {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d6d3d1;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
    background: #fffdf7;
}

#input-buscar:focus {
    outline: none;
    border-color: #d97706;
}

/* lista */
ul {
    list-style: none;
}

li {
    background: #fffdf7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* cabecera de cada item */
li .item-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

li .item-nombre {
    font-weight: bold;
    font-size: 15px;
    color: #2d2d2d;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

li .item-fecha {
    font-size: 11px;
    color: #a8a29e;
    margin-top: 2px;
}

/* botones de borrar y editar */
li .btn-borrar,
li .btn-editar {
    background: none;
    border: 1px solid #d6d3d1;
    color: #78716c;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    font-weight: normal;
    flex-shrink: 0;
}

li .btn-borrar:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

li .btn-editar:hover {
    border-color: #d97706;
    color: #d97706;
    background: #fffbeb;
}

li .item-botones {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* tags */
li .item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
}

li .tag {
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #fde68a;
}

/* descripcion */
li .item-desc {
    font-size: 13px;
    color: #57534e;
    margin: 6px 0;
    line-height: 1.4;
}

/* enlaces */
li .item-links {
    font-size: 12px;
    margin: 6px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

li .item-links a {
    color: #d97706;
    text-decoration: none;
}

li .item-links a:hover {
    text-decoration: underline;
}

/* transcripcion desplegable */
li details {
    margin-top: 8px;
}

li details summary {
    cursor: pointer;
    font-size: 12px;
    color: #78716c;
    padding: 4px 0;
}

li details summary:hover {
    color: #d97706;
}

li details p {
    font-size: 13px;
    color: #57534e;
    margin-top: 8px;
    padding: 10px;
    background: #fffbeb;
    border-left: 3px solid #d97706;
    border-radius: 0 4px 4px 0;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* mensaje de vacio */
#vacio {
    color: #a8a29e;
    text-align: center;
    padding: 24px;
    font-size: 14px;
}

/* footer */
footer {
    background: #292524;
    color: #a8a29e;
    text-align: center;
    padding: 12px;
    font-size: 12px;
}

/* responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 22px;
    }

    header p {
        font-size: 12px;
    }

    main {
        padding: 12px 8px;
    }

    section {
        padding: 14px;
    }

    form {
        flex-direction: column;
    }

    input[type="text"],
    input[type="url"] {
        width: 100%;
    }

    button {
        width: 100%;
        padding: 10px;
    }

    li .item-cabecera {
        flex-direction: column;
        align-items: stretch;
    }

    li .item-botones {
        justify-content: flex-end;
    }

    li .item-links {
        flex-direction: column;
        gap: 4px;
    }
}