/* Estilos responsivos para o bloco de compartilhamento */

/* Container principal */
.share-block-container {
    max-width: 100%;
    overflow: hidden;
}

/* Input responsivo */
.share-input {
    font-size: 12px;
    line-height: 1.2;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .share-input {
        font-size: 14px;
        line-height: 1.4;
    }
}

@media (min-width: 768px) {
    .share-input {
        font-size: 16px;
        line-height: 1.5;
    }
}

/* Botão responsivo */
.share-button {
    min-width: 60px;
    font-size: 12px;
    padding: 8px 12px;
}

@media (min-width: 640px) {
    .share-button {
        min-width: 80px;
        font-size: 14px;
        padding: 10px 16px;
    }
}

@media (min-width: 768px) {
    .share-button {
        min-width: 100px;
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* QR Code responsivo */
.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-code-image {
    max-width: 100%;
    height: auto;
}

/* Layout responsivo para o bloco de compartilhamento */
.share-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .share-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }
}

/* Texto truncado para mobile */
.url-preview {
    font-size: 10px;
    color: #6b7280;
    word-break: break-all;
    line-height: 1.2;
    margin-top: 4px;
}

@media (min-width: 640px) {
    .url-preview {
        font-size: 12px;
        margin-top: 6px;
    }
}

/* Melhorias para inputs em mobile */
@media (max-width: 639px) {
    input[type="text"] {
        font-size: 14px !important;
        padding: 8px 12px !important;
    }
    
    .share-input-container {
        margin-bottom: 8px;
    }
    
    .share-button-container {
        width: 100%;
    }
    
    .share-button {
        width: 100%;
        justify-content: center;
    }
}

/* Tooltip para URLs longas */
.url-tooltip {
    position: relative;
    cursor: help;
}

.url-tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    max-width: 300px;
    word-break: break-all;
}

/* Animações suaves */
.share-block-container {
    transition: all 0.3s ease;
}

.share-button {
    transition: all 0.2s ease;
}

.share-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

/* Melhorias para acessibilidade */
.share-input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.share-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Estados de loading e feedback */
.share-button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.share-button.success {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
}

.share-button.error {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
}

/* Classes para acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Otimizações para mobile */
.mobile-optimized .share-input {
    font-size: 14px !important;
    padding: 12px !important;
}

.mobile-optimized .share-button {
    min-height: 48px !important;
    font-size: 16px !important;
}

/* Animações de entrada */
.share-block-container {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Notificações */
.share-notification {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Melhorias para hover em desktop */
@media (hover: hover) {
    .share-block-container:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .share-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Melhorias para dispositivos touch */
@media (hover: none) and (pointer: coarse) {
    .share-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .share-input {
        min-height: 44px;
    }
} 