/**
* ESTILOS DE LA HOME
*
*/


body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f2f2f2;
}

main {
    padding: 1rem;
}

/* El contenedor del post */
.pinned {
    position: relative;
    border: 2px solid #ffd700; /* Un borde dorado opcional para resaltar */
   
}

/* El emoji flotante */
.pinned::before {
    content: "\1F4CC";
    position: absolute;
	font-family: "Noto Sans Symbols", sans-serif;
    color: #ffd700; /* Aquí controlas el tono de gris o negro */
    font-weight: bold;
    top: 10px;      /* Distancia desde arriba */
    right: 10px;    /* Distancia desde la derecha */
    font-size: 1.2rem;
	z-index: 10000;
	text-shadow: 
        0 0 5px  #fff4a3,  
        0 0 10px #ffd700,  
        0 0 20px #ffaa00;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.post-card {
    position: relative;
	aspect-ratio: 1;
    min-height: 180px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
	clip-path: inset(0);
	background-color: transparent;
}

.post-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  font-size: 0;
  color: transparent;
  z-index: 0;
  transition: filter 0.3s ease, transform 0.3s ease;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.blured {
  filter: blur(5px);
  transform:  scale(1.05);
}

/*
 interacción 
 */
.blured:active,
.blured:hover,
.blured:focus {
  filter: blur(0);
  transform: scale(1);
}

.post-card > .post-title {
	position: absolute;
    left: .75rem;
    bottom: 0px;
    font-weight: 700;
	color: white;
    z-index: 2;
    word-break: break-word;
	text-shadow:
    0 0 2px rgba(0,0,0,0.8),
    0 0 6px rgba(0,0,0,0.6);
}

.user-panel-first-row {
	display: flex;
	gap: 20%;
}

.blur-box {
	display: flex;
	flex-direction: column;
}

.empty {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
}

@media (max-width: 1100px) {
    .posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/**
*
* ESTILOS DEL HEADER
*
*/

.app-header {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-sizing: border-box;
    background: #1f2937;
    color: #fff;
	flex-shrink: 0;
}

.app-header-left,
.app-header-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.app-header label {
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.app-header a {
	all: unset;
}

.app-header button {
    border: none;
    border-radius: 6px;
    padding: .45rem .75rem;
    cursor: pointer;
    font-weight: 600;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index:10;
}

.token-modal,
.new-post-modal,
.filter-modal,
.notification-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
	z-index: 100;
}

#tags-input{
	width: 100%;
	margin-bottom: 0; 
	border: none;
}

.new-post-actions fieldset {
	width: 100%;
	padding: 0;
	border-radius: 2px;
} 

.media-input-row{
	display: flex;
	flex-direction: row;
	gap: 3%;
}
.media-input-row > input[type='url']{
	flex-grow: 1;
}
.media-input-row > input[type='checkbox']{
	flex: 0 0 auto;
	width: auto;
	justify-content: flex-end;
	align-self: center;
}
.media-input-row > label{
	flex-grow: 0;
	align-self: center;
	justify-content: flex-end;
	margin-right: 5px;
}

.media-image > .blured {
	transition: filter 0.3s ease, transform 0.3s ease;
}

.new-post-actions div {
	display: flex;
	gap: .5rem;
}

.new-post-tag-chip-contaier {
	padding: 3px 15px 12px 5px;
	display: flex;
	gap: 3px;
	justify-content: start;
	flex-wrap: wrap;
}

.new-post-checkbox-chip:has(input:checked) {
	background-color: green;
}
.new-post-checkbox-chip input:checked + span {
	color: white;
}


.token-modal-content,
.new-post-modal-content,
.filter-modal-content,
.notification-modal-content {
    background: #fff;
    color: #111;
    width: min(92vw, 560px);
    border-radius: 8px;
    padding: 1rem;
    z-index: 1000;
}

.token-modal-content h2,
.new-post-modal-content h2 {
    margin-top: 0;
}

.token-modal-row {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}

.token-modal-row input {
    flex: 1;
    padding: .5rem;
}

.new-post-form input,
.new-post-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: .6rem;
    margin-bottom: .6rem;
}

.token-modal-actions,
.new-post-actions,
.filter-modal-actions,
.notification-modal-actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
}

.token-modal-actions button,
.new-post-actions button {
    padding: .5rem .9rem;
    cursor: pointer;
}

.button {
	padding: .5rem .9rem;
	padding-top: .6rem;
    cursor: pointer;
	display: inline-block;
	cursor: pointer;
	border-radius: 4px;
	border: 1px solid #8f8f9d;
	background: #e9e9ed;
	font-size: small;
	color: black;
	vertical-align: sub;
}

.header-new-btn {
    background: #10b981;
	border: 1px solid black;
	color: #fff;
}

.button:hover {
	background-color: #c7c7cc;
}

.tag-filter-container {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
	border: 1px solid black;
	border-radius: 6px;
	margin-bottom: 15px;
	position: relative;
	flex-wrap: wrap;
}
.tag-filter-container:before {
	position: absolute;
	top: -15px;
	left: 15px;
	background-color: #fff;
	padding: 5px;
	content: "Seleccion de tags";
}
.filter-modal {
  display: none;
}

#filter-toggle:checked ~ .filter-modal {
  display: flex;
}

.token-modal {
  display: none;
}

#token-toggle:checked ~ .token-modal {
  display: flex;
}

.new-post-modal {
  display: none;
}

#new-post-toggle:checked ~ .new-post-modal {
  display: flex;
}

.token-modal-user-mode>#user-panel{
	display: block;	
}

.notification-modal {
  display: none;
}

#notification-toggle:checked ~ .notification-modal {
  display: flex;
}

.notification-label {
	position: relative;
}

.notification-count {
	position: absolute;
	color: limegreen;
	top: 22%;
	left: 33%;
}

.notification-modal-content {
	min-width: 50%;
	max-width: 80%;
	min-height: 50%;
	max-height: 80%;
	padding: 2%;
	display: flex;
	flex-direction: column;
}

.notification-container {
	flex-grow: 1;
	overflow-y: auto;
	margin-bottom: 15px;
}

.notification-container a{
	all: unset;
	cursor: pointer;
}

.notification {
    display: flex;
    align-items: center;
    height: 70px; /* altura fija para todas */
    overflow: hidden;
    border-bottom: 1px solid #ddd;
}

.notification:hover {
	animation: green-hover 1s ease-in-out both;
}

@keyframes green-hover {
	0% {background-color: white;}
	100% {background-color: rgba(0, 255, 0, .5);}
}


/* Imagen = cuadrado perfecto del alto del contenedor */
.notification-thumb {
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    flex-shrink: 0;
}

/* Contenido */
.notification-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px;
    min-width: 0;
    flex: 1;
}

/* Título */
.notification-title {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Texto */
.notification-text {
    font-size: 0.9em;
    color: #666;
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/**
*
* ESTILOS DEL POST
*
**/

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

main {
    max-width: 900px;
    margin: 1rem auto;
    padding: 0 1rem 2rem;
}

section {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.post-title {
    margin-top: 0;
    margin-bottom: 1rem;
}

.post-portrait {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #eee;
}

.commetn-form {
	display:flex;
	flex-direction: column;
}

.comment-form textarea,
.comment-form input {
    width: 100%;
    box-sizing: border-box;
    padding: .6rem;
    margin-bottom: .5rem;
}

.comment-form button {
    padding: .5rem .9rem;
    cursor: pointer;
}

.comment-box {
	margin-top: 10px;
	display: block;
	width: 100%;
}

.comment-item {
    border-top: 1px solid #ddd;
    padding-left: 10px;
	background-color: white;
	animation: none;
}


@keyframes test {
	0% {background-color: white;}
	50% {background-color: rgba(0, 255, 0, .5);}
	0% {background-color: white;}
}

.comment-item:target {
	animation: test 3s;
}

.comment-item:first-child {
	user-select: none;
}

.comment-meta {
    font-size: .85rem;
    color: #555;
    margin: .35rem;
}

.comment-content {
	padding: 10px;
}

.comment-tag{
	text-transform: uppercase;
	text-decoration: none;
	color: green;
	cursor: pointer;
}

.small {
	font-size: 11px;
}

.green-text {
	color: green;
}

.own-comment {
	border-top: 2px solid black;
	background-image: linear-gradient(0deg,
  rgba(0, 0, 0, 0.001) 72%,
  rgba(0, 0, 0, 0.25) 100%
);
}

.media {
    margin-top: 8px;
	overflow: hidden;
    border-radius: 8px;
}

.media img,
.media iframe {
    max-width: 100%;
	border-radius: inherit;
	width: 100%;
	display: block;
}

.media iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.media img {
    cursor: pointer;
}

.tag-chip {
	cursor: pointer;
	border: 1px solid black;
	border-radius: 8px;
	padding: 3px;
}

.tag-chip>a{
	all: unset;
}

.tag-chip:hover {
	background-color: black;
	color: white;
}

.tag-chip-container {
	padding: 3px 15px 12px 5px;
	display: flex;
	gap: 3px;
	justify-content: end;
	overflow-y: visible !important;
	flex-wrap: wrap;
}

.checkbox-chip:has(input:checked){
	background-color: red;
	color: white;
}
.checkbox-chip {
	background-color: green;
	color: white;
}

.panel {
	display: flex;
	flex-direction: column;
}

#user-panel-radio,
#admin-panel-radio{
	opacity: 0%;
}
 
 #admin-panel,
 .panel {
	 display:none;
 }
 
 #user-panel-radio:checked ~ #user-panel{
	 display:block;
 }
 #admin-panel-radio:checked ~ #admin-panel{
	 display:block;
 }
 
.tab-label{
	cursor: pointer;
}


/**
*
* ESTILOS DEL LOGIN
*
**/

body {
    font-family: Arial, sans-serif;
    margin: 2rem;
}

.login-row {
    display: flex;
    gap: .5rem;
    max-width: 500px;
}

input[type="text"] {
    flex: 1;
    padding: .5rem;
}

button {
    padding: .5rem 1rem;
    cursor: pointer;
}

.new-user {
    margin-top: 1rem;
}