/* Integração Assinatura e Login - CSS Público
 * Desenvolvedor: Roger Maiocchi
 * Versão: 1.0.0
 */

/* === Container de Login === */
.ial-login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.ial-login-container h3 {
    margin: 0 0 20px;
    color: #1d2327;
    font-weight: 600;
}

.ial-social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ial-terms {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
}

/* === Botões === */
.ial-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.ial-btn svg {
    flex-shrink: 0;
}

.ial-btn-google {
    background: #fff;
    border: 1px solid #dadce0;
    color: #3c4043;
}

.ial-btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.ial-btn-facebook {
    background: #1877f2;
    color: #fff;
}

.ial-btn-facebook:hover {
    background: #166fe5;
    transform: translateY(-1px);
}

.ial-btn-logout {
    background: #f0f0f0;
    color: #333;
}

.ial-btn-logout:hover {
    background: #e0e0e0;
}

.ial-logged-in {
    text-align: center;
    padding: 20px;
}

/* === Assinatura === */
.ial-assinatura-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ial-documento-info {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.ial-documento-info h4 {
    margin: 0 0 4px;
    color: #1d2327;
}

.ial-documento-meta {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.ial-btn-assinar {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    font-size: 16px;
}

.ial-btn-assinar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.ial-area-assinatura {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ial-hash-display {
    margin-bottom: 16px;
}

.ial-hash-display label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.ial-hash-display code {
    display: block;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    word-break: break-all;
    color: #333;
}

.ial-confirmacao {
    margin-bottom: 16px;
}

.ial-confirmacao label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.ial-confirmacao input[type="checkbox"] {
    margin-top: 3px;
}

.ial-btn-confirmar {
    width: 100%;
    background: #007bff;
    color: #fff;
}

.ial-btn-confirmar:hover:not(:disabled) {
    background: #0056b3;
}

.ial-btn-confirmar:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ial-resultado {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
}

.ial-resultado.sucesso {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ial-resultado.erro {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* === Validação === */
.ial-validacao-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ial-validacao-container h3 {
    margin: 0 0 10px;
    color: #1d2327;
}

.ial-validacao-container>p {
    margin: 0 0 20px;
    color: #666;
}

.ial-validacao-form {
    display: flex;
    gap: 10px;
}

.ial-validacao-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
}

.ial-validacao-form input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.ial-btn-validar {
    background: #007bff;
    color: #fff;
    white-space: nowrap;
}

.ial-btn-validar:hover {
    background: #0056b3;
}

#ial-resultado-validacao {
    margin-top: 20px;
}

.ial-validacao-sucesso {
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
}

.ial-validacao-sucesso h4 {
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ial-validacao-erro {
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

/* === Perfil === */
.ial-perfil-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ial-perfil-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.ial-perfil-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.ial-perfil-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.ial-perfil-info h3 {
    margin: 0 0 4px;
    color: #1d2327;
}

.ial-perfil-info p {
    margin: 0;
    color: #666;
}

.ial-perfil-assinaturas h4 {
    margin: 0 0 16px;
    color: #1d2327;
}

.ial-assinaturas-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ial-assinaturas-lista li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.ial-assinaturas-lista li:last-child {
    border-bottom: none;
}

.ial-assinatura-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ial-assinatura-item strong {
    flex: 1;
    color: #1d2327;
}

.ial-assinatura-data {
    font-size: 13px;
    color: #666;
}

.ial-link-validar {
    font-size: 13px;
    color: #007bff;
    text-decoration: none;
}

.ial-link-validar:hover {
    text-decoration: underline;
}

.ial-no-data {
    color: #666;
    font-style: italic;
}

/* === Mensagens === */
.ial-warning {
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    color: #856404;
}

.ial-error {
    padding: 16px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

/* === Responsivo === */
@media (max-width: 480px) {
    .ial-validacao-form {
        flex-direction: column;
    }

    .ial-perfil-header {
        flex-direction: column;
        text-align: center;
    }

    .ial-assinatura-item {
        flex-direction: column;
        align-items: flex-start;
    }
}