/* Estilos para el Generador de Ilustraciones */

.tb-illustration-admin {
    margin-top: 20px;
}

.tb-admin-tabs .nav-tab-wrapper {
    margin-bottom: 20px;
}

.tab-content {
    display: none;
}

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

.tb-loading {
    text-align: center;
    padding: 20px;
}

.tb-loading .spinner {
    float: none;
    margin: 0 auto 10px;
}

.tb-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tb-gallery-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tb-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tb-gallery-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.tb-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.tb-gallery-item:hover .tb-gallery-image img {
    transform: scale(1.05);
}

.tb-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tb-gallery-item:hover .tb-gallery-overlay {
    opacity: 1;
}

.tb-gallery-view,
.tb-gallery-edit {
    color: #fff;
    text-decoration: none;
    padding: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: background 0.3s;
}

.tb-gallery-view:hover,
.tb-gallery-edit:hover {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

.tb-gallery-info {
    padding: 15px;
}

.tb-gallery-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.tb-gallery-description {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.tb-gallery-date {
    color: #999;
    font-size: 11px;
}

.tb-no-images {
    text-align: center;
    padding: 40px;
    color: #666;
}

.tb-gallery-filters {
    margin-bottom: 20px;
}

.tb-gallery-filters select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Estilos para el frontend */
.tb-frontend-illustration-generator {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tb-illustration-header {
    text-align: center;
    margin-bottom: 30px;
}

.tb-illustration-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.tb-illustration-header p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.tb-illustration-form {
    margin-bottom: 30px;
}

.tb-form-group {
    margin-bottom: 20px;
}

.tb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.tb-form-group textarea,
.tb-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.tb-form-group textarea:focus,
.tb-form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

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

.tb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tb-form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.tb-form-actions {
    text-align: center;
    margin-top: 30px;
}

.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.tb-btn-primary {
    background: #0073aa;
    color: #fff;
}

.tb-btn-primary:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.tb-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tb-btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.tb-loading {
    text-align: center;
    padding: 40px;
}

.tb-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tb-results-container {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.tb-results-container h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
}

.tb-generated-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tb-result-image {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.tb-result-image:hover {
    transform: translateY(-2px);
}

.tb-result-image img {
    width: 100%;
    height: auto;
    display: block;
}

.tb-result-image p {
    padding: 15px;
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.tb-examples-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.tb-examples-section h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
}

.tb-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.tb-example-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
    transition: transform 0.3s;
}

.tb-example-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tb-example-item h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.tb-example-item p {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .tb-form-row {
        grid-template-columns: 1fr;
    }
    
    .tb-examples-grid {
        grid-template-columns: 1fr;
    }
    
    .tb-generated-images {
        grid-template-columns: 1fr;
    }
    
    .tb-image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .tb-frontend-illustration-generator {
        padding: 15px;
    }
    
    .tb-illustration-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .tb-image-gallery {
        grid-template-columns: 1fr;
    }
    
    .tb-gallery-item {
        margin-bottom: 15px;
    }
    
    .tb-btn-large {
        padding: 14px 24px;
        font-size: 16px;
    }
}

/* Animaciones */
.tb-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tb-slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Estados de carga */
.tb-loading-state {
    position: relative;
    pointer-events: none;
}

.tb-loading-state::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mensajes de estado */
.tb-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: 500;
}

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

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

.tb-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
