/**
 * share_card.css - Estilos del generador de tarjetas gráficas compartibles
 * Compatible con temas claro y oscuro, y optimizado para móvil.
 */

/* Botón de activación de la tarjeta compartible */
.btn-gradient-share {
    background: linear-gradient(135deg, #00d2ff 0%, #0077b6 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.25);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 42px;
    text-decoration: none;
}

.btn-gradient-share:hover {
    background: linear-gradient(135deg, #33dcff 0%, #0096c7 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.4);
    color: #ffffff !important;
}

.btn-gradient-share:active {
    transform: translateY(0);
}

.btn-gradient-share i {
    font-size: 1rem;
}

/* Modal de previsualización de tarjeta */
.modal-share-card .modal-dialog {
    max-width: 780px;
}

.modal-share-card .modal-content {
    background: #11151c;
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 210, 255, 0.15);
    color: #f8fafc;
    overflow: hidden;
    backdrop-filter: blur(16px);
}

body.light-theme .modal-share-card .modal-content {
    background: #ffffff;
    border: 1px solid rgba(0, 119, 182, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 30px rgba(0, 119, 182, 0.1);
    color: #0f172a;
}

.modal-share-card .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.5rem;
    align-items: center;
}

body.light-theme .modal-share-card .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-share-card .modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.modal-share-card .modal-title i {
    color: #00d2ff;
}

body.light-theme .modal-share-card .modal-title i {
    color: #0077b6;
}

.modal-share-card .modal-body {
    padding: 1.5rem;
}

/* Contenedor de la previsualización */
.share-card-preview-wrapper {
    position: relative;
    width: 100%;
    background: #090c10;
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
}

body.light-theme .share-card-preview-wrapper {
    background: #f1f5f9;
    border-color: rgba(0, 0, 0, 0.08);
}

.share-card-img-preview {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    display: block;
    transition: opacity 0.3s ease;
}

/* Spinner de generación */
.share-card-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    gap: 1rem;
}

.share-card-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    color: #00d2ff;
}

body.light-theme .share-card-loader .spinner-border {
    color: #0077b6;
}

.share-card-loader-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

body.light-theme .share-card-loader-text {
    color: #64748b;
}

/* Barra de acciones del modal */
.share-card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn-share-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    min-height: 44px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    text-align: center;
}

.btn-share-copy {
    background: rgba(0, 210, 255, 0.12);
    color: #00d2ff;
    border-color: rgba(0, 210, 255, 0.3);
}

.btn-share-copy:hover {
    background: rgba(0, 210, 255, 0.22);
    color: #ffffff;
    border-color: #00d2ff;
}

body.light-theme .btn-share-copy {
    background: rgba(0, 119, 182, 0.1);
    color: #0077b6;
    border-color: rgba(0, 119, 182, 0.25);
}

body.light-theme .btn-share-copy:hover {
    background: #0077b6;
    color: #ffffff;
}

.btn-share-download {
    background: #0077b6;
    color: #ffffff;
}

.btn-share-download:hover {
    background: #0096c7;
    color: #ffffff;
}

.btn-share-native {
    background: #10b981;
    color: #ffffff;
}

.btn-share-native:hover {
    background: #059669;
    color: #ffffff;
}

/* Toast flotante de éxito al copiar */
.share-toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #10b981;
    color: #ffffff;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    white-space: nowrap;
}

.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Canvas oculto para renderizado */
#shareCardHiddenCanvas {
    display: none;
}

/* Responsividad móvil */
@media (max-width: 576px) {
    .modal-share-card .modal-dialog {
        margin: 0.5rem;
    }

    .modal-share-card .modal-body {
        padding: 1rem;
    }

    .share-card-actions {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .btn-share-action {
        width: 100%;
        min-height: 44px;
        font-size: 0.95rem;
    }
}
