/* assets/verify-style.css */
/* Sistema de Verificação de Compras - Estilos RESPONSIVO MOBILE */

.kg-verify-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.kg-verify-box {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    animation: kgSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes kgSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.kg-verify-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 35px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kg-verify-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: kgShimmer 4s ease-in-out infinite;
}

@keyframes kgShimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.kg-verify-header h2 {
    color: white !important;
    font-size: 32px !important;
    margin: 0 0 12px 0 !important;
    font-weight: 800 !important;
    position: relative;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.kg-verify-header p {
    color: rgba(255, 255, 255, 0.95) !important;
    margin: 0 !important;
    font-size: 16px;
    line-height: 1.6;
    position: relative;
}

/* Form Container */
.kg-verify-form {
    padding: 40px 35px;
    background: #fafbfc;
}

/* Input Selector */
.kg-input-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    padding: 6px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.kg-selector-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #6c757d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.kg-selector-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kg-selector-btn:hover {
    transform: translateY(-1px);
}

.kg-selector-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Input Groups */
.kg-input-group {
    margin-bottom: 30px;
    animation: kgFadeIn 0.4s ease;
}

@keyframes kgFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kg-input-group label {
    display: block;
    margin-bottom: 12px;
    color: #2c3e50;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.kg-input-wrapper {
    position: relative;
}

.kg-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    z-index: 1;
}

.kg-input-wrapper input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.kg-input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.kg-input-wrapper input::placeholder {
    color: #adb5bd;
}

/* Submit Button */
.kg-submit-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.kg-submit-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.kg-submit-button:hover::after {
    width: 400px;
    height: 400px;
}

.kg-submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.kg-submit-button:active {
    transform: translateY(-1px);
}

.kg-submit-button.loading {
    pointer-events: none;
    opacity: 0.85;
}

/* Spinner */
.kg-spinner {
    width: 24px;
    height: 24px;
    animation: kgSpin 0.8s linear infinite;
}

.kg-spinner circle {
    stroke-dasharray: 100;
    stroke-dashoffset: 75;
    transform-origin: center;
}

@keyframes kgSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Result Box */
.kg-result-box {
    margin-top: 35px;
    padding: 25px;
    border-radius: 16px;
    animation: kgSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes kgSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kg-result-box.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #b1dfbb;
}

.kg-result-box.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #f1aeb5;
}

.kg-result-box.loading {
    background: linear-gradient(135deg, #cfe2ff 0%, #b6d4fe 100%);
    border: 2px solid #9ec5fe;
    text-align: center;
}

/* Result Title */
.kg-result-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 800;
}

.kg-result-box.success .kg-result-title {
    color: #155724;
}

.kg-result-box.error .kg-result-title {
    color: #721c24;
}

.kg-result-box.loading .kg-result-title {
    color: #004085;
    justify-content: center;
}

/* Credentials Box */
.kg-credentials-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.kg-credential-item {
    padding: 15px 0;
    border-bottom: 2px solid #f0f0f0;
}

.kg-credential-item:last-child {
    border-bottom: none;
}

.kg-credential-label {
    color: #6c757d;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

/* CORREÇÃO PRINCIPAL: Valor das credenciais com melhor layout mobile */
.kg-credential-value {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 700;
    background: #f8f9fa;
    padding: 12px 80px 12px 16px; /* Espaço maior à direita para o botão COPIE */
    border-radius: 8px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    border: 2px dashed #dee2e6;
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kg-credential-value:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.kg-copy-hint {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-family: -apple-system, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Products List */
.kg-products-list {
    margin-top: 20px;
}

.kg-products-title {
    color: #2c3e50;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kg-product-item {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 8px;
}

.kg-product-name {
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
    flex: 1;
    min-width: 0; /* Permite quebra de linha se necessário */
}

.kg-product-qty {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Access Button */
.kg-access-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 18px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 12px;
    margin-top: 25px;
    font-weight: 800;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.kg-access-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    color: white !important;
}

/* Instructions Box */
.kg-instructions-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.kg-instructions-title {
    color: #856404;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kg-instructions-content {
    color: #856404;
    line-height: 1.8;
}

.kg-instructions-content ol {
    margin: 15px 0 0 20px;
    padding: 0;
}

.kg-instructions-content li {
    margin-bottom: 12px;
    font-size: 15px;
}

.kg-instructions-content strong {
    color: #6c5a00;
    font-weight: 800;
}

/* Footer */
.kg-footer {
    text-align: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
}

.kg-footer p {
    color: #6c757d;
    font-size: 14px;
    margin: 8px 0;
}

.kg-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
}

.kg-footer a:hover {
    text-decoration: underline;
}

/* Error Messages */
.kg-error-suggestions {
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 18px;
    margin-top: 20px;
}

.kg-error-suggestions h4 {
    color: #721c24;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
}

.kg-error-suggestions ul {
    margin: 0 0 0 20px;
    padding: 0;
}

.kg-error-suggestions li {
    color: #721c24;
    margin-bottom: 8px;
    font-size: 14px;
}

/* ====================================
   RESPONSIVIDADE MOBILE APRIMORADA
==================================== */

/* Tablets */
@media (max-width: 768px) {
    .kg-verify-wrapper {
        padding: 15px;
        margin: 20px auto;
    }
    
    .kg-verify-header {
        padding: 35px 25px;
    }
    
    .kg-verify-form {
        padding: 35px 25px;
    }
    
    .kg-instructions-content {
        font-size: 14px;
    }
}

/* Mobile Large (até 480px) */
@media (max-width: 480px) {
    .kg-verify-wrapper {
        padding: 10px;
        margin: 10px auto;
    }
    
    .kg-verify-header {
        padding: 25px 20px;
    }
    
    .kg-verify-header h2 {
        font-size: 24px !important;
    }
    
    .kg-verify-header p {
        font-size: 14px;
    }
    
    .kg-verify-form {
        padding: 25px 20px;
    }
    
    /* Botões seletores menores */
    .kg-input-selector {
        gap: 8px;
        padding: 4px;
    }
    
    .kg-selector-btn {
        font-size: 13px;
        padding: 12px 8px;
    }
    
    /* Campos de credenciais mobile */
    .kg-credential-value {
        font-size: 14px;
        padding: 10px 70px 10px 12px;
        word-break: break-word;
        line-height: 1.4;
    }
    
    .kg-copy-hint {
        right: 6px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    /* Lista de produtos mobile */
    .kg-product-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    .kg-product-name {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .kg-product-qty {
        align-self: flex-end;
        font-size: 12px;
    }
    
    /* Instruções mobile */
    .kg-instructions-title {
        font-size: 16px;
        gap: 8px;
    }
    
    .kg-instructions-content {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .kg-instructions-content ol {
        margin-left: 15px;
    }
    
    .kg-instructions-content li {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    /* Caixa de credenciais mobile */
    .kg-credentials-box {
        padding: 20px 15px;
    }
    
    .kg-credential-item {
        padding: 12px 0;
    }
}

/* Mobile Small (até 360px) */
@media (max-width: 360px) {
    .kg-verify-wrapper {
        padding: 8px;
    }
    
    .kg-verify-header {
        padding: 20px 15px;
    }
    
    .kg-verify-header h2 {
        font-size: 22px !important;
    }
    
    .kg-verify-form {
        padding: 20px 15px;
    }
    
    .kg-selector-btn {
        font-size: 12px;
        padding: 10px 6px;
    }
    
    /* Credenciais muito pequenas */
    .kg-credential-value {
        font-size: 13px;
        padding: 8px 60px 8px 10px;
    }
    
    .kg-copy-hint {
        right: 4px;
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .kg-instructions-content {
        font-size: 12px;
    }
    
    .kg-instructions-content li {
        font-size: 12px;
    }
}

/* Correção para telas muito altas (evitar espaçamento excessivo) */
@media (min-height: 800px) {
    .kg-verify-wrapper {
        margin: 60px auto;
    }
}

@media (max-height: 600px) {
    .kg-verify-wrapper {
        margin: 20px auto;
    }
    
    .kg-verify-header {
        padding: 25px;
    }
    
    .kg-verify-form {
        padding: 25px;
    }
}