/* Gerador de Pedido de Desculpa - Estilos */
.gpd-container {
    --accent-color: #AB202B;
    --accent-light: #d63447;
    --accent-dark: #8b1a1a;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-white: #ffffff;
    --bg-gray-50: #f7fafc;
    --bg-gray-100: #edf2f7;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.gpd-container * {
    box-sizing: border-box;
}

.gpd-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.gpd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
}

.gpd-header {
    text-align: center;
    margin-bottom: 32px;
}

.gpd-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    border-radius: 50%;
    color: white;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

.gpd-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

.gpd-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gpd-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gpd-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.gpd-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.gpd-radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-white);
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
    position: relative;
}

.gpd-radio-option:hover {
    border-color: var(--accent-color);
    background: var(--bg-gray-50);
}

.gpd-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gpd-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.gpd-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    transition: var(--transition);
}

.gpd-radio-option input[type="radio"]:checked + .gpd-radio-custom {
    border-color: var(--accent-color);
}

.gpd-radio-option input[type="radio"]:checked + .gpd-radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.gpd-radio-option input[type="radio"]:checked ~ .gpd-radio-text {
    color: var(--accent-color);
    font-weight: 600;
}

.gpd-radio-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.gpd-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: var(--transition);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.gpd-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(171, 32, 43, 0.1);
}

.gpd-textarea::placeholder {
    color: var(--text-muted);
}

.gpd-char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.gpd-submit-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
}

.gpd-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.gpd-submit-btn:active {
    transform: translateY(0);
}

.gpd-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.gpd-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gpd-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: gpd-spin 1s linear infinite;
}

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

.gpd-cooldown {
    background: var(--bg-gray-50);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 16px;
}

.gpd-cooldown-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.gpd-result {
    background: var(--bg-gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-top: 24px;
    animation: gpd-fadeIn 0.5s ease-out;
}

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

.gpd-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.gpd-result-icon {
    color: var(--accent-color);
    flex-shrink: 0;
}

.gpd-result-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.gpd-pedido-texto {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.gpd-result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gpd-copy-btn,
.gpd-new-btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
}

.gpd-copy-btn {
    background: var(--bg-white);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.gpd-copy-btn:hover {
    background: var(--accent-color);
    color: white;
}

.gpd-new-btn {
    background: var(--accent-color);
    color: white;
}

.gpd-new-btn:hover {
    background: var(--accent-dark);
}

.gpd-error {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #c53030;
}

.gpd-error-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.gpd-error p {
    margin: 0;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 640px) {
    .gpd-container {
        padding: 16px;
    }
    
    .gpd-card {
        padding: 24px;
    }
    
    .gpd-radio-group {
        flex-direction: column;
    }
    
    .gpd-radio-option {
        min-width: auto;
    }
    
    .gpd-result-actions {
        flex-direction: column;
    }
    
    .gpd-copy-btn,
    .gpd-new-btn {
        justify-content: center;
    }
}

/* Estados de foco para acessibilidade */
.gpd-radio-option:focus-within {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.gpd-submit-btn:focus,
.gpd-copy-btn:focus,
.gpd-new-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

