/**
 * Anigenet Status - Estilos
 */

/* Contenedor principal */
.anigenet-statuses-container {
    display: flex;
    gap: 15px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.anigenet-statuses-container::-webkit-scrollbar {
    height: 6px;
}

.anigenet-statuses-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.anigenet-statuses-container::-webkit-scrollbar-thumb {
    background: #00A8E8;
    border-radius: 3px;
}

/* Loading de estados */
.loading-statuses {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #999;
    font-size: 14px;
}

.loading-statuses span {
    font-size: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Botón crear estado */
.create-status-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 90px;
    cursor: pointer;
    transition: transform 0.2s;
}

.create-status-btn:hover {
    transform: scale(1.05);
}

.add-status-circle {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #00A8E8;
}

.add-status-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #00A8E8;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 3px solid white;
}

.create-status-text {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Lista de estados */
.statuses-scroll {
    display: flex;
    gap: 15px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 90px;
    cursor: pointer;
    transition: transform 0.2s;
}

.status-item:hover {
    transform: scale(1.05);
}

.status-circle {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    padding: 3px;
    background: linear-gradient(45deg, #00A8E8, #E91E63, #9C27B0);
}

.status-circle.viewed {
    background: #ddd;
}

.status-circle-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid white;
    overflow: hidden;
}

.status-circle-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-name {
    font-size: 13px;
    color: #333;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modal crear estado */
.anigenet-status-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

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

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* Tabs */
.status-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: white;
    border-color: #00A8E8;
    color: #00A8E8;
}

.tab-btn span {
    font-size: 20px;
    margin-right: 5px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Creador de texto */
.text-status-creator textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    font-family: inherit;
}

.text-status-creator textarea:focus {
    outline: none;
    border-color: #00A8E8;
}

.char-counter {
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
    color: #999;
}

.color-picker {
    margin-top: 20px;
}

.color-picker label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
}

.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: #333;
    transform: scale(1.15);
}

/* Upload de media */
.media-upload-area {
    margin-bottom: 15px;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed #00A8E8;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s;
}

.upload-label:hover {
    background: #f0f9ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-label span {
    font-size: 14px;
    color: #666;
}

.upload-label small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.media-preview {
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
}

.media-preview img,
.media-preview video {
    width: 100%;
    display: block;
}

/* Botón publicar */
.btn-publish-status {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #00A8E8, #0077B6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s;
}

.btn-publish-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 232, 0.3);
}

.btn-publish-status:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal visor */
.anigenet-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.viewer-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    height: 80vh;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    z-index: 1;
}

.viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

.author-info h4 {
    margin: 0;
    color: white;
    font-size: 15px;
}

.author-info span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.delete-status-btn {
    background: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.viewer-progress {
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 5;
}

.progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 80px;
}

.viewer-content.text-status {
    font-size: 24px;
    color: white;
    text-align: center;
    font-weight: 600;
    line-height: 1.4;
    padding: 20px;
}

.viewer-content img,
.viewer-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.viewer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    text-align: center;
    z-index: 5;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.viewer-prev {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.viewer-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .viewer-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}
